• Python’s with statement

    Python’s with statement

    Managing resources usually involves three steps – allocating, using, and releasing. You’re familiar with the try... finally pattern but Python also provides context managers.

    (more…)

  • Disable all WordPress Plugins

    Disable all WordPress Plugins

    Check error logs to find which plugin is crashing the site, then check the site’s wp-config.php file to identify the database name and prefix.

    Using phpMyAdmin or similar, assuming “wp” is the prefix, locate wp_options table and edit the active_plugins row.

    The data starts a:X where X is the number of active plugins. Change the entry to a:0:{} to disable all plugins.