WordPress Fatal error: Call to a member function add_rewrite_tag()

Last updated on August 8th, 2022 at 11:20 am

Click to rate this tutorial!
[Total: 0 Average: 0]

Today while upgrading one of my website from WordPress version 2.7 to Version 3.0.1 I saw this error. I was trying to update my WordPress through Admin Console since it is very easy. The error says

Fatal error: Call to a member function add_rewrite_tag() in taxonomy.php

A lazy day for me that I didn’t even bother to take my DB backup, WHY? because last time I have done the same method of upgrade for a tutorial website I owned and it worked without any issue.

The first thing to check if you face similar error is your PLUGINS

What is the FIX?

Just follow these steps

  1. Use FTP (or login to the server using SSH, Navigate the the wordpress root directory)
  2. Go to wp-content in FTP or /var/www/html/wp-content (or similar in SSH)
  3. Rename your plugins DIR (use MV command if logged in via SSH) . In linux use command mv plugins plugins_oldx_2022 or something that cannot be guessed easily
  4. Check the URL and Verify whether your website is loading fine
  5. Once confirmed enable rename the plugins_oldx_2022 back to plugins
  6. If the website went down again or started showing different error, try to rename your installed plugins under wp-content/plugins one by one and in parallel reload your site to figure out the culprit

Click to rate this tutorial!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published.