One of the errors that gives less information at the time of showing itself, and consequently more scare, is the terrifying one Server internal error or, if it leaves in English, Internal Server Error .
One would think that, being the server, the only solution is, then, to call server, the provider of your hosting, and is not badly thought.
In any case is a bloody mistake, because you know that something is not right, but it gives you no clue what is broken
But in reality does not have to be an error of your hosting, they can be many things so we are going to see the possible culprits of an internal error of the server and how to fix it in our web WordPress.
What causes an internal server error?
There are several po sibles culprits namely:
- WordPress installation
- File .htaccess
- PHP memory
- Your hosting
To know what is the culprit my advice is to follow this sequence of actions:
Regenerate the file .htaccess
To eliminate the biggest suspect of an internal error of the server, Not the only one, I always start reviewing the file .htaccess .
The problem with this file is that there are many plugins that add lines so that sometimes guess what could have caused the problem is complicated especially if you have no knowledge of servers.
So the easiest, and sure, is to do the following:
- Access via FTP or the cPanel of your hosting and rename the current file .htaccess to something else, for example antigua.htaccess
- If you go to your site and the internal error of the server has been fixed, access your WordPress desktop, that is, at tudominio.es/wp-admin/
- Ve a Settings> Permanent links and Saves changes without modifying any settings.
What you have done is force WordPress to generate a new file .htaccess ] clean only with the WordPress rules, and by the way you know it was something in the old.htaccess what caused the error.
Now you have to check what was in that file , that's why you have the copy, which caused the error.
Disable the plugins
The next possible culprit is the plugins simply because can load functions that insert lines in the file .htaccess or break WordPress and all your installation if there is a problem of pr o
As we will not have access to the administration, access your installation of WordPress by FTP or cPanel and rename the folder plugins that is, change the folder that is in the path / wp-content / plugins / to something else, for example / wp-content / plugins_rotos /
What you do with this is disable all plugins automatically ]well you do not, WordPress, not finding the standard path where the plugins are installed.
Visit your site, and if the server's internal error has been fixed, rename the plugins folder to its original name.  Now you can access the WordPress desktop again, but with all the plugins inactive.
The following you already know, or imagine, right? You have to activate plugins one by one and checking which is causing the internal server error or Internal Server Error .
Once located, to deactivate it, rename your folder or delete it directly by FTP or the panel of your hosting, get in touch with the developer to let them know and offer you a solution, and look for an alternative plugin that offers the same functionality but without errors.
Changes theme … temporarily
If the plugins are not, also the active theme could cause an internal error of the server .
And it is that the themes not only make your web look beautiful and functional, also include (increasingly) internal functions, practically plugins which like your plugins can cause an internal server error.
Here the solution is similar to the previous one, and we will take advantage of ] a trick not very known WordPress, at least not as well known as I would like .
Again, access your installation via FTP or cPanel and check if, in addition to the currently active topic, you have installed a recent default theme of WordPress; I mean the Twenty Something .
If you do not have any of these installed download it from the official WordPress themes directory and upload it to your WordPress installation themes folder ( / wp-content / themes / ).
Once this is done rename the current theme folder to whatever you want . For example, from / wp-content / themes / my-theme / to / wp-content / themes / my-theme-broken / .
In a few seconds WordPress will detect that the current theme is not available in the path stored in the database and it will change to the first default theme that it finds installed, pure WordPress magic .
Now visit your site to check if this has managed to fix the server's internal error.
If so, talk to the developer, get a clean copy of your favorite theme or look for another that offers the same but without errors.
Upload the memory of PHP
] Another possible culprit can be that you have little memory for PHP a directive that is usually marked by default by hosting companies, but that we can manipulate to a certain extent.
If none of the above has worked this could be the problem, so we will try to force r memory available for PHP the programming language used by WordPress, its plugins and issues massively.
This is so because they can match processes on your website at a given time that exceed that available memory, and force a internal error of the server.
It can be, for example, an automated task of a plugin that coincides with the publication of an entry or go to know.
Whatever it is, we will increase the limit of the memory of PHP to check if it was that. To achieve this we have to try to bypass the limits imposed by the server, which we can achieve in several ways.
Increase the PHP memory limit from .htaccess
Add to the file .htaccess the following line :
php_value memory _ limit 512M
Save the changes and check to see if the server's internal error was fixed.
Increase the PHP memory limit from wp-config.php
If the above does not work for you, delete that line and add this one to your file wp-config.php :
define ( 'WP_MEMORY_LIMIT' '512M' ) ;
Again, save the changes and check your website to see if you no longer have the Internal Server Error of the noses.
Increase the memory limit to PHP from php.ini
If you have full access to all the routes of your hosting, locate the PHP parameter configuration file, called php.ini and change the PHP memory limit line to these values:
memory_limit = 512M ; Maximum amount of ] memory to script may consume ( 256MB )
If not you have access to the file path php.ini original you can create yourself one in the folder wp-admin and add the following:
And if all else fails … call your hosting
If none of the above solves the problem talk to your hosting provider, with your hosting and inform them. They have access to all your server, to the error logs and can more easily determine what caused the problem .
In addition, you can increase, even temporarily, the available memory, so you can review the steps that we have seen previously.
I hope this guide has helped you solve some Internal Server Error or internal server error . If that's the case, share how you managed it with everyone, so you'll help others too.