How to fix an "HTTP error 500" in WordPress?

f:id:brillasjohn:20200723222904j:plain


The 500 error in WordPress again can be due to several reasons. But don't worry, I'm going to explain what they are all and how you can solve them.

 

1. When Changing The Theme

 

If you change the Theme of your site and suddenly an HTTP error 500 code appears in WordPress, it may be due to the installation of that new theme.

www.wpoven.com

 

Why? There can be several reasons, for example, that this new WordPress template is poorly created and is generating some kind of problem in the query.

 

It is even possible that the theme is using some PHP function that is "limited" on the server for security reasons.

 

When this happens, we have a serious problem, since we cannot access the wp-admin of our WordPress to change the template for the old one.

 

What we have to do in this case is to access the files of our website via FTP and, in the WP-CONTENT / THEMES folder, look for the folder of our theme.

 

We copy the name of that theme folder and delete it.

 

After this, we can take any of the themes that come by default in WP and put the name that we have copied from the theme that gave failure.

 

2. When Installing A Plugin

 

Something also quite frequent is that the HTTP error 500 appears because of conflicts between plugins of your page or your blog in WordPress.

 

Fixing it is easy, but sometimes it can take a while.

 

On many occasions, the plugins can have failures or even use restricted or incompatible functions with our server.

 

To solve this problem, we will have to deactivate the plugin, but if our website gives us an error 500 and we cannot enter the wp-admin, we will not be able to do so.

 

In this case, what we will do is access the files on our website via FTP and access the WP-CONTENT / PLUGINS directory and delete the folder from our plugin.

However, if the problem persists, perhaps it is that two or more of your plugins have begun to be incompatible with each other, which can sometimes happen with updates to them.

 

To solve this, it would be best if you deactivate all of them.

 

If you see that the problem disappears, it is that you have guessed the cause of the problem, but now you must activate the plugins one by one, to see which one was causing the problems.

 

Again, if we cannot access wp-admin, we will have to rename or delete the folders of the plugins, so that WordPress deactivates them.

 

3. A Plugin That Modifies The .Htaccess

 

Some plugins on our website in WP modify the .htaccess file without our being aware of it.

 

As I mentioned before, the .htaccess file can generate 500 errors, therefore, it is important to have a backup of the old .htaccess, or to generate a new .htacess, to be able to check if this is the fault.

 

4. For Extreme Cases

 

For extreme cases in which we do not find out what the problem is, we can resort to reinstalling it again and thus check if the problem comes from there or if it is an external problem.

 

Download WordPress from the official website and upload the files via FTP, replacing the old files.

 

Remember that you must leave the old wp-config.php file, which is where the connection data to the database of your WP installation is, something essential for this to work.

 

If you have downloaded a newer version of WP, you must also access "tuweb.com/wp-admin/upgrade.php" via the browser, so that the part of the database corresponding to the new version is updated.