While upgrading the WordPress version of a friend from WordPress 2.7 to 3.0.1, I encountered a PHP error “Call to a member function add_rewrite_tag() on a non-object in …/taxonomy.php on line 289″, which terminated the site including the wordpress admin.
Being a PHP Programmer, the instinct was to edit the taxonomy.php file, but thinking about it made me realize that WordPress core files are thoroughly tested and seldom makes a PHP error, the culprit may either be the wordpress theme or a wordpress plugin. And while searching online, my guess was correct, this error usually is caused by an old wordpress plugin which either was not updated or needs an update.
Steps that I took to fix the problem:
1. Login to FTP or your Web Hosting Control Panel and rename the plugins folder inside wp-content to another name like pluginsx or _plugins
Note: This will automatically disable all plugins and you can now access your wordpress admin.
2. Rename back the plugin folder to its original name
3. Login to your WordPress Admin and click Plugins, Update the plugins that needs updating and Activate the plugin one at a time to know which plugin is the cause of the error
Note: If there is no update on the plugin and it was the one that was causing the errors, just leave it deactivated and choose a similar plugin or contact the developer or author of the plugin.
WordPress Tips: Backup the whole database and the wp-content folder before upgrading your WordPress version.
Lessons Learned:
Update all Plugins to their latest versions and deactivate all Plugins before upgrading your WordPress version
