How we have fixed fatal error on wordpress site after update

Problem description:

Soon after I updated to Wordpress 4.01 my blog developed a fatal error and would not load. I could not access the dashboard on my wordpress sire. The problem was within the WP Admin folder (according to the error message) and so I downloaded wordpress 4.01 and uploaded both the Admin and Includes folders manually (but not the content folder of course).

Now when I try to view the blog, or try to log in to the dashboard I get the following message:

Fatal error: Cannot redeclare get_query_template() (previously declared in /home/binsco5/public_html/blog/wp-includes/theme.php:744) in /home/binsco5/public_html/blog/wp-includes/template.php on line 42

Martin Brunet
Binscombe Doctor Blog

How we have fixed it:

Martin, who is in charge of Binscombe Doctor Blog has done everything correctly.

He has automatically updated his blog to the newest version of WordPress, and unexpectedly got: 

Fatal error on wordpress site after update

Fatal error: Cannot redeclare get_query_template() (previously declared in /home/binsco5/public_html/blog/wp-includes/theme.php:744) in /home/binsco5/public_html/blog/wp-includes/template.php on line 42

Let’s take a closer look at this error message. It will help us to find the solution.

The first and most important piece of information is the folder name /wp-includes/.

It is a folder where internal WordPress files are kept.

Any file or folder which starts with wp-* is internal wordpress stuff.

The only exception is wp-content. This is where your site’s files are kept.

So, the fatal error message says that the problem has happened with WordPress core.

It has nothing to do with your site or theme. Otherwise the error message would indicate an error in /wp-content/ folder.

Good. Your site’s files are intact.

For now it’s all what we need to know to go to the solution part: Let’s fix WordPress core.

How do you fix WordPress core?

Simply replace all old WordPress core files and folders on your server with new ones from wordpress.org

This is how you do it.

First, backup your entire site. This is crucial. You are going to more a lot of files around and could accidentally delete a wrong file or folder.

Second, deactivate all plugins.

Deactivate all of your wp plugins

Third. Download new WordPress core.

Go to wordpress.org, click and download WordPress right from the home page.

Wordpress.org home page

Download wp from the home page

Unpack the files. This is what you should see:

List of wordpress core files

Connect to your server through ftp and go to your wordpress site’s root folder.

You should see a similar list of files and folders as on the picture below.

List of wordpress files on remote server

You will see some additional files in the root folder. Files which you do not see in WordPress core download.

These are your site’s and server’s utility files. What you will see are, for example, Google analytics file, error log, cgi bin folder and other.

Don’t touch or remove any of these additional files and folders as well the files and folders listed below:

wp-config.php

wp-content folder

wp-images folder

wp-includes/languages/ folder

htaccess file

robots.txt

I have pointed out files which you should keep in the picture below.

Additional files or folders which are unrelated to wordpress could have different names on your server then in the example below. Once again. Do not touch them.

Keep these wordpres files, delete the rest

The example site does not have these folders and file:

wp-images folder

wp-includes/languages/ folder

robots.txt

If you have them, keep them.

Now, delete all other files and folders.

Just as a reminder, whatever happens do not delete your wp-content folder. This is where you whole site is located.

I have market what you should delete on your remote server:

Delete these wordpress files

If you have /languages/ subfolder in your wp-includes/ folder, keep the subfolder.

More than half of the work is done.

After corrupt files are gone, replace them with the new ones which you have downloaded from wordpress.org.

Here is the list:

Wordpress fatal error after update to 4.01 files to upload

After upload is complete activate you plugins.

Activate your plugins

That’s it. 

Fatal error on wordpress site after update

has been eliminated. Binscombe Doctor Blog was up and running.

If you follow the same process, I am sure you will be able to fix update and error problems on your site.

Just keep in mind: Follow all steps, do not skip anything, proceed slowly, but surely.

Customer testimonial:

" Many thanks for sorting it out so effectively. I have been very impressed with the service you offer. It was prompt and very responsive in the way you guided me as to what needed to be done, with an excellent end result. The no-strings free trial was all you said it would be and I would certainly recommend it to others. I’m happy to be included in your testimonials. "

Martin Brunet
Binscombe Doctor Blog

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

How much is Time limit is exhausted. Please reload CAPTCHA.