If you are encountering a WordPress error message or white screen, don’t panic. Someone has likely encountered the same message before and it can easily be solved.
This page lists the most common WordPress errors experienced by WordPress users, and provides a starting point for fixing them. At WordPress Support, you will also find links to more detailed pages or forums where a volunteer will be there to help.
The White Screen of Death
Both PHP errors and database errors can manifest as a white screen, a blank screen with no information, commonly known in the WordPress community as the WordPress White Screen of Death (WSOD).
Before resorting to desperate measures, there are a number of reasons for the WordPress white screen of death:
- A Plugin is causing compatibility issues. If you can access the Administration Screens try deactivating all of your Plugins and then reactivating them one by one. If you are unable to access your Screens, log in to your website via FTP. Locate the folder
wp-content/pluginsand rename the Plugin folderplugins_old. This will deactivate all of your Plugins. You can read more about manually deactivating your plugins in the Troubleshooting FAQ. - Your Theme may be causing the problem. This is especially likely if you are experiencing the white screen of death after you have just activated a new Theme, or created a New Site in a WordPress Network. Log in to the WordPress Administration Screens and activate a default WordPress Theme (e.g. Twenty Twenty-One). If you are using WordPress 5.8 and below, please switch to Twenty Twenty-One theme since the Twenty Twenty-Two theme requires 5.9 and above. If you can’t access your Administration Screens, access your website via FTP and navigate to the
/wp-content/themes/folder. Rename the folder for the active Theme.
The WP_DEBUG feature often provides additional information.
Internal Server Error

There can be a number of reasons for an Internal Server Error. Here are some thing you can do to solve it:
- The most likely issue is a corrupted
.htaccessfile. Log in to your site root using FTP and rename your.htaccessfile to.htaccess_old. Try loading your site to see if this has solved your problem. If it works, make sure to visit Settings > Permalinks and reset your permalinks. This will generate a new.htaccessfile for you. - Try deactivating all of your Plugins to see if it is a Plugin issue. If you are unable to access your WordPress Administration Screens, deactivate your Plugins via FTP by following these instructions.
- Switch the Theme to a WordPress default Theme (e.g. Twenty Twenty-One) to eliminate any Theme-related problems. If you are using WordPress 5.8 and below, please switch to Twenty Twenty-One theme since the Twenty Twenty-Two theme requires 5.9 and above.
- Increase the PHP Memory limit
- Try re-uploading the
wp-adminandwp-includesfolders from a fresh install of WordPress.
Error Establishing Database Connection
If you get a page featuring the message “Error Establishing Database Connection,” this means that there is a problem with the connection to your database and there could be a number of reasons for this. The following are possible reasons and solutions.
Incorrect wp-config.php Information
“Error establishing a database connection” is usually caused by an error in your wp-config.php file. Access your site in your FTP client. Open up wp-config.php and ensure that the following are correct:
- Database name
- Database username
- Database password
- Database host
Learn more about editing wp-config.php.
If you are sure your configuration is correct you could try resetting your MySQL password manually.
Problems with Your Web Host
The next step is to contact your web host. The following hosting issues may be causing the problem:
- Your database has met its quota and has been shut down.
- The server is down.
Contact your hosting provider to see if either of these issues is causing your problem.
Compromised Website
If you have checked wp-config.php for errors, and confirmed with your host for hosting issues, it is possible that your site has been hacked.
Scan your site with Sucuri SiteCheck to ensure that it hasn’t been compromised. If it has you should check out My Site was Hacked.
Failed Auto-Upgrade
There will be situations when the WordPress auto-update feature fails. Symptoms include:
- A blank white screen and no information.
- A warning that the update failed.
- A PHP error message.
The WordPress automatic upgrade feature may fail due to a glitch in the connection with the main WordPress files, a problem with your Internet connection during upgrade, or incorrect File Permissions
To update your WordPress site manually, see the Manual Update article.
Connection Timed Out
The connection timed out error appears when your website is trying to do more than your server can manage. It is particularly common on shared hosting where your memory limit is restricted. Here are some things you can try:
- Deactivate all Plugins. If deactivating all the WordPress Plugins on your site resolves the issue, reactivate them one-by-one to see which plugin is causing the problem. If you are unable to access your Administration Screens, read about how to manually deactivate your plugins.
- Switch to a default WordPress Theme. If you are using WordPress 5.8 and below, please switch to Twenty Twenty-One theme since the Twenty Twenty-Two theme requires 5.9 and above. This should rule out any Theme-related problems.
- Increase your memory limit in wp-config.php. If you are on shared hosting you may have to ask your hosting provider to increase your memory limit for you.
- Increase the maximum execution time in your php.ini file. This is not a WordPress core file so if you are not sure how to edit it, contact your hosting provider to ask them to increase your maximum execution time. See below instructions for increasing maximum execution time.
Maintenance Mode Following Upgrade

When WordPress updates, it automatically installs a .maintenance file. Following upgrade, you may receive a message that says “Briefly unavailable for scheduled maintenance. Please check back in a minute.” The maintenance file may not have been removed properly.
To remove this message do the following:
- Log in to your website using your FTP program
- Delete the
.maintenancefile, which will be found in your site root.
Read more about the maintenance mode issue.
You Make Changes and Nothing Happens
If you are making changes to your website and you do not see the changes in your browser, you may need to clear your browser cache. Your browser stores information about the websites that you visit. This makes it faster to load websites when you visit them because the browser just has to reload information already stored on your computer, rather than downloading it again.
If you make a change to a website and the browser does not think it is significant, it will simply load the data from your cache, and you won’t see your changes. To fix the problem, simply empty your browser cache or close the tab and reopen the link.
Pretty Permalinks 404 and Images not Working
If you are experiencing 404 errors with pretty permalinks and a white screen when you upload images, mod_rewrite may not be enabled in Apache by default. Mod_rewrite is an extension module of the Apache web server software which allows for “rewriting” of URLs on-the-fly. It’s what you need to make pretty permalinks work.
WordPress Multisite networks usually experience this but it can also occur on shared hosting providers or after a site migration or server move.
Reset your permalinks through Settings > Permalinks. If this does not work, you may have to edit the .htaccess file manually.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If you are not familiar with editing your .htaccess file, contact your hosting provider to ask them to turn on mod_rewrite rules. There is more information on pretty permalinks in the WordPress Codex.
Custom Post Type 404 Errors
You may experience problems with 404 errors and custom post types. Try the following steps:
- Make sure that none of your Custom Post Types and single pages have the same name. If they do, rename the single page, including the slug.
- Log in to your WordPress Administration Screens, navigate to Settings > Permalinks. Select the default permalinks. Save. Then reselect your preferred permalinks. This will flush the rewrite rules and should solve your problem.
Specific Error Messages
There are a number of different errors that will appear in your error logs. To access your error logs you will need to turn on debugging and then locate your error log via FTP. The following information will help you to decipher some of the common error messages.
PHP Errors
Below are some common PHP error messages.
Fatal Errors and Warnings
If you receive a warning that WordPress cannot modify header information and headers are already sent, it usually means that you have spaces or characters before the opening tags or after the closing tags. Read how to fix the headers already sent error.
If you are experiencing this problem when you have just installed WordPress you may have introduced a syntax error into wp-config.php. These instructions will help you to fix the error.
Call to undefined function
An error reading call to undefined function could mean that a WordPress Plugin is trying to find a file or data which isn’t present or accessible in the code. Reasons for this include:
- An error when trying to auto-install or auto-upgrade a Plugin. Try installing or upgrading the Plugin manually.
- An error when trying to auto-install or auto-upgrade a Theme. Try installing or upgrading the Theme manually.
- You may be using an incompatible WordPress Plugin or incompatible Theme. This could happen with older versions of WordPress and a new WordPress Plugin, or if you are trying to use a WordPress Multisite Plugin on a single site installation. Upgrade WordPress to resolve this issue.
- You may be trying to call a function that doesn’t exist. Check
functions.phpfor misspellings.
Try deactivating the WordPress Plugin or changing the WordPress Theme that caused the error to appear. If you are unable to do this from within the Administration Screens, you may have to do this manually via FTP.
Allowed memory size exhausted
An Allowed Memory Size Exhausted error means that your WordPress installation doesn’t have enough memory to achieve what you want. You can try out the following steps:
- Increase your memory limit in wp-config.php
- Increase your memory limit by editing
php.ini. This is not a file that comes with WordPress so if you are unfamiliar with it you should contact your web host about increasing your memory limit.
Maximum execution time exceeded
You may receive a message such as “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 60 seconds exceeded”. This means that it is taking to longer for a process to complete and it is timing out. There are a number of ways to fix this error.
Editing .htaccess
Make sure you back up .htaccess before you edit it.
Add the following line to .htaccess:
php_value max_execution_time 60
Editing php.ini
Add the following to php.ini
max_execution_time = 60
If you are unsure of how to make these changes, or if you are on shared hosting that prevents you from making them yourself, you should contact your hosting provider and ask them to increase your maximum execution time.
Parse errors
Syntax Error
A syntax error means that you have made a mistake while creating your PHP structure. You could, for example, be;
- Missing a
;at the end of an individual line. - Using curly quotation marks.
- Missing a curly bracket.
When this error appears it will tell you which file the error appears in (functions.php for example) and approximately which line (it may not always be the exact line so be sure to check just before and just after) in the code.
Unexpected
If you are receiving an error which says ‘parse error: unexpected’ this usually means that you have forgotten to include a character. The most common are:
- Unexpected ‘=’ : you have forgotten to include the $ when referencing a variable
- Unexpected ‘)’ : you have forgotten to include the opening bracket (
- Unexpected ‘(‘ : you have forgotten to include the closing bracket )
- Unexpected T_STRING: you have forgotten a quotation mark or a semi-colon at the end of the previous line
- Unexpected T_ELSE: you have an else statement with no opening if statement
Use of an undefined constant
As with parse errors, “use of an undefined constant” means that you are missing a character. It could be one of the following:
- Missing a $ when referencing a viariable
- Missing quotation marks around array keys
Database Errors
The following errors may appear in relation to your WordPress database.
Error 13 – Cannot Create/Write to File
There are a number of reasons why you may be experiencing this error.
MySQL cannot create a temporary file.
The MySQL variable tmpdir is set to a directory that cannot be written to when using PHP to access MySQL. To verify this, enter MySQL at the command line and type show variables. You’ll get a long list and one of them will read: tmpdir = /somedir/ (whatever your setting is.)
To solve this, alter the tmpdir variable to point to a writable directory.
- Find the my.cnf file. On *nix systems this is usually in /etc/. On Windows system, Find the my.ini.
- Once found, open this in a simple text editor and find the [mysqld] section.
- Under this section, find the tmpdir line. If this line is commented (has a # at the start), delete the # and edit the line so that it reads: tmpdir = /writable/dir where /writable/dir is a directory to which you can write. Some use /tmp, or you might also try /var/tmp or /usr/tmp. On Windows, use C:/Windows/tmp.
- Save the file.
- Shutdown MySQL by typing
mysqlshutdown -u -p shutdown. - Start MySQL by going to the MySQL directory and typing
./bin/safe_mysqld &. Usually the MySQL directory is in /usr/local or sometimes in /usr/ on Linux systems.
The file permissions are incorrect
Correct the File Permissions.
If none of this make sense and you have someone to administrate your system for you, show the above to them and they should be able to figure it out.
CREATE Command Denied to User
This error occurs when the user assigned to the database does not have adequate permissions to perform the action to create columns and tables in the database. You will need to log in to CPanel or Plesk to give your database user adequate permissions.
Alternatively you can create a new user to assign to your database. If you do create a new user you will need to ensure that it is updated in wp-config.php.
Error 28
It could be because:
- you are out of space on /tmp (wherever tmpdir is), or,
- you have too many files in /tmp (even if there is lots of free space), or,
- Your cache on your server is full
This is a MySQL error and has nothing to do with WordPress directly; you should contact your host about it. Some users have reported that running a “repair table” command in phpMyAdmin fixed the problem.
Error 145
This indicates that a table in your database is damaged or corrupted. If you are comfortable using phpMyAdmin you can use these instructions on repairing your MySQL database tables.
Always backup your database before performing any actions on it.
If you have not used phpMyAdmin before, or are uncomfortable doing so, contact your web host and ask them to run CHECK/REPAIR on your database.
Unknown Column
An unknown column error can be caused by a missing column in the database. If you have just upgraded WordPress then try manually upgrading again. To update your WordPress site manually, see the Update article.
If you are running a database query when you encounter the error then you may by using incorrect quotation marks for the identifier quote character. This question on Stack Overflow provides more details. Also see the MySQL documentation.
Resources
- MySQL Error Codes and Messages
Are you seeing a 500 internal server error in WordPress?
The internal server error is one of the most common WordPress errors. Since the error doesn’t give any other information, many beginners find it quite frustrating.
In this article, we will show you how to easily fix the 500 internal server error in WordPress.

Here is a quick overview of the topics we’ll cover in this article.
- What is The 500 Internal Server Error?
- What Causes The Internal Server Error in WordPress?
- Video Tutorial
- Fixing The 500 Internal Server Error in WordPress
- Clear WordPress and Browser Cache
- Checking for Corrupt .htaccess File
- Increasing the PHP Memory Limit
- Deactivate All WordPress Plugins
- Switch to a Default WordPress Theme
- Re-uploading Core Files
- Enable Debug Logs in WordPress
- Ask your Hosting Provider
What is The 500 Internal Server Error?
The 500 internal server error is a common web server error. It is not specific to WordPress websites and can happen with any website.
The 500 in the error message is technically an HTTP error code. Looking up this code will only show its standard description.
“500 Internal Server Error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.“
This is a generic catch-all error message which means that the server was unable to assign a better more helpful error message when it encountered the issue.
The error page looks different depending on which web server software (Nginx or Apache) your website is using and which browser you are using.
Here is how the Apache error page may look.

It may look different if you are using Nginx and Google Chrome.
It will also look different if Google chrome is unable to find an error page to display:

For beginners, this can be incredibly frustrating. There is no clue or message that would point them in the right direction to quickly fix it.
Asking how to fix an internal server error is like asking your doctor how to fix the pain you’re experiencing without telling them where the pain is.
However, if we know the common causes that trigger this error, then we can try fixing them one by one to resolve the error without breaking anything.
What Causes The Internal Server Error in WordPress?
Internal server error in WordPress is often caused by a corrupt .htaccess file, poorly coded plugins, or your active WordPress theme.
Other possible causes of the internal server error in WordPress that we know of are: PHP memory limit or corrupt core WordPress files.
In some conditions, the internal server error may only show up when you are trying to access the WordPress admin area while the rest of the site works fine.
That being said, now let’s take a look at how to go about troubleshooting the internal server error in WordPress.
Video Tutorial
Subscribe to WPBeginner
If you prefer written instructions, then continue reading.
Fixing The 500 Internal Server Error in WordPress
Before you begin troubleshooting, make sure that you have a complete WordPress backup of your website on hand.
If you have access to the WordPress admin area, then you can a WordPress backup plugin to create a complete backup of your website. We recommend using Duplicator to handle this.
On the other hand, if you don’t have access to the WordPress admin area, then you can manually create a WordPress backup using phpMyAdmin and an FTP client.
After that, you can follow the following steps to troubleshoot and fix the internal server error on your website.
Clear WordPress and Browser Cache
Browsers and your WordPress caching plugins can sometimes mistakenly store a cached copy of an error page.
The easiest way to fix this is by first clearing your browser cache.

After that, if you have access to the WordPress admin area of your website, then you can empty the WordPress cache by visiting your caching plugin’s settings page.
For details, see our tutorial on how to clear WordPress cache.
Checking for Corrupt .htaccess File
The .htaccess file is a server configuration file that is also used by WordPress to set up redirects.
One of the most common causes of the internal server error is the corrupt .htaccess file.
The easiest way to fix this is by simply visiting the Settings » Permalinks page in the WordPress admin area and then clicking on the ‘Save Changes’ button without making any changes at all.

WordPress will now try to update your .htaccess file or generate a new one for you. You can now visit your website to see if this has resolved the internal server error.
If you can still see the error, then you need to make sure that WordPress was able to generate or write to the .htaccess file.
Sometimes, due to file and directory permissions, WordPress may not be able to create or write to your .htaccess file.
You can now try to manually replace the .htaccess file. First, you need to login to your website using FTP or the File Manager app under your hosting account control panel.
Next, you need to rename your main .htaccess file to something like .htaccess_old. This lets you keep the file as a backup, but WordPress won’t recognize it.
To rename the .htaccess file, you will need to login to your site using FTP or File Manager app in your hosting account’s cPanel dashboard.
Once you are connected, the .htaccess file will be located in the same directory where you will see folders like wp-content, wp-admin, and wp-includes.
Simply, right-click on the .htaccess file and rename it to .htaccess_old.

Next, you need to create a new .htaccess file.
Inside your site’s root folder, right-click and then select ‘Create new file’ option in your FTP client or File Manager app.

Name this new file .htaccess and click OK to save it.
Now, this .htaccess file is currently empty and you need to add default WordPress rewrite rules to it.
Simply right-click on the file and then select View/Edit in your FTP client or File Manager app.

The empty file will open in a plain text editor like Notepad or TextEdit. Now, you need to copy and paste the following code inside it.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
This code is the default rule set used by WordPress. Don’t forget to save your changes and upload the file back to the server.
You can now visit your website to see if this has resolved the internal server error.
If it did, then give yourself a pat on the back because you fixed the internal server error.
Important: Before you move on with other things, make sure that you go to Settings » Permalinks page in the WordPress admin area and click the save button without making any changes. This will regenerate the .htaccess file for you with proper rewrite rules to ensure that your post pages do not return a 404 error.
If checking for the corrupt .htaccess file solution did not work for you, then you need to continue reading this article.
Increasing the PHP Memory Limit
Sometimes the internal server error can happen if a script is consuming all the PHP memory limit.
The easiest way to increase the PHP memory limit is by editing the wp-config.php file. Be careful when you do this if you’re a beginner. You want to follow these instructions carefully because even small mistakes in WordPress core files can break your site.
To begin, simply connect to your WordPress website using an FTP client or the File Manager app under your hosting account control panel.
You’ll find wp-config.php file inside the main folder of your website. Right-click on it and select ‘Download.’ This will ensure that you have a backup of the file in case something goes wrong.
When you’ve saved that, you can right-click on it and select ‘View/Edit.’

Inside the wp-config.php file, you need to add the following code just above the line that reads ‘That’s all, stop editing! Happy publishing’.
define( 'WP_MEMORY_LIMIT', '256M' );
For more details, see our tutorial on how to increase PHP memory limit in WordPress.
If you are seeing the internal server error only when you try to log in to your WordPress admin or upload an image in your wp-admin, then you should increase the memory limit by following these steps:
- Create a blank text file on your computer and name it php.ini
- Paste this code in there: memory=256MB
- Save the file
- Upload it into your /wp-admin/ folder using FTP
If increasing the memory limit fixed the problem for you, then you have only fixed the problem temporarily. You still need to find the cause that is exhausting your memory limit.
This could be a poorly coded plugin or even a theme function. We strongly recommend that you ask your WordPress web hosting company to look into the server logs to help you find the exact diagnostics.
If increasing the PHP memory limit did not fix the issue for you, then you are in for some more troubleshooting.
Deactivate All WordPress Plugins
If none of the above solutions worked for you, then this error is most likely being caused by a specific plugin installed on your website.
It is also possible that it is a combination of plugins that are not playing nice with each other.
If you can access the WordPress admin area of your website, then you can simply go to the plugins page and deactivate all WordPress plugins.

However, if you are unable to access the WordPress admin area, then you can deactivate all WordPress plugins using FTP.
Simply connect to your WordPress website using an FTP client or the file manager app under your hosting account control panel.
Once connected, navigated to the /wp-content/ folder and rename the plugins folder to plugins.deactivated.

WordPress looks for plugins in the plugins folder. If the plugins folder is not found, then it will automatically deactivate all plugins.
You can now try visiting your website to see if this resolved the internal server error on your website.
To restore all your plugins, you can simply rename the plugins.deactivated folder back to plugins.
Your plugins will now be restored but they will still be deactivated.
You can now activate plugins one by one and visit your website to figure out which plugin is causing the internal server error.
For more details, see our guide on how to deactivate all WordPress plugins without WP-Admin.
If deactivating all plugins didn’t fix the internal server error on your website, then continue reading.
Switch to a Default WordPress Theme
One possible cause of the internal server error could be some code in your WordPress theme.
To find out if this is the case, you need to switch your theme to a default WordPress theme.
If you have access to the WordPress admin area, then simply go to the Appearance » Themes page. If you have a default theme already installed then you can simply click on the Activate button to switch theme.

If you don’t have a default theme installed, then you can click on the Add New button at the top and install a default theme (Twenty Twenty-Three, Twenty Twenty-Two, etc).
Now in case you don’t have access to the WordPress admin area, you can still switch to a default theme.
Simply, connect to your WordPress website using an FTP client and navigate to the /wp-content/ folder.
Right-click to select the themes folder and download it to your computer as a backup.

Next, you need to delete the themes folder from your website. Once it is deleted, go ahead and create a new themes folder.
Your new themes folder will be completely empty which means you don’t have any WordPress themes installed at the moment.
Next, you need to visit the WordPress themes directory and download a default WordPress theme to your computer.

Your browser will then download the theme as a zip file to your computer.
Locate the file on your computer and then unzip it. Windows users can unzip file by right-clicking on it and then selecting Extract All. Mac users can double-click on the zip file to extract it.

You’ll now see a folder containing your WordPress theme.
Switch back to your FTP client or File Manager up and upload this folder to the empty themes folder.

Once uploaded, WordPress will automatically start using the default theme.
You can now visit your website to see if this resolved the internal server error.
If this didn’t work, then you can reupload your WordPress themes from the backup or switch back to the theme you were using.
Don’t worry there are still a few more things you can do to fix the error.
Re-uploading Core Files
If the plugin and theme options didn’t fix the internal server error, then it is worth re-uploading the /wp-admin/ and /wp-includes/ folders from a fresh WordPress install.
This will NOT remove any of your information, but it may solve the problem in case any file was corrupted.
First, you will need to visit the WordPress.org website and click on the Download button.

This will download the WordPress zip file to your computer.
Go ahead and extract the zip file. Inside it, you will find a wordpress folder.

Next you need to connect to your WordPress website using an FTP client.
Once connected go to the root folder of your website. It is the folder that has wp-admin, wp-includes, wp-content folders inside it.
In the left column open the WordPress folder on your computer.
Now you need to select all files inside the wordpresss folder and upload them to your website.

Your FTP client will now transfer those folders to your server.
It will ask you whether you would like to overwrite the files. Select ‘Overwrite’ and then select ‘Always use this action’.

Your FTP client will now replace your older WordPress files with new, fresh copies.
If your WordPress files were corrupted, then this step will fix the internal server error for you.
Enable Debug Logs in WordPress
WordPress comes with a built-in system to keep logs for debugging.
You can turn it on by using the WP Debugging plugin. For more details, see our guide on how to install a WordPress plugin.
Once activated, the plugin will turn on debugging logs on your WordPress website.
If you don’t have access to the admin area of your WordPress website, then you can turn on debugging by adding the following code to your wp-config.php file.
define( 'WP_DEBUG', true); define( 'WP_DEBUG_LOG', true);
Once you have turned on debug logs, you can view these logs by using an FTP client and navigating to the /wp-content/ folder.

You can open the debug log file in a text editor and it will show you a list of errors and warnings that occur on your website.
Some of these errors and warnings can be harmless incidents that may not need fixing. However, if you are seeing an internal server error on your website then these may point you in the right direction.
Ask your Hosting Provider
If all methods fail to fix the internal server error on your website, then it is time to get some more help. Contact your web hosting support team and they will be able to check the server logs and locate the root cause of the error.
If you want to continue troubleshooting on your own, then see our ultimate WordPress troubleshooting guide for beginners.
We hope this article helped you fix the internal server error in WordPress. You may also want to see our complete list of the most common WordPress errors, and our guide on how to choose the best web hosting provider.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Сообщение об ошибке сервера 500 на стороне клиента или в панели администрирования может стать источником серьезных проблем и причиной потери посетителей. Устранить внутреннюю ошибку сервера HTTP 500 особенно сложно, потому что причины возникновения подобной неполадки могут быть самыми разными.
Формат сообщения о внутренней ошибке сервера 500 не предполагает никаких пояснений о возможном источнике проблемы, и на поиск причины возникновения неполадки могут уйти часы терпеливой работы. В это время сайт теряет посетителей и возможные продажи, страдает репутация компании.

Если на вашем сайте появилось сообщение о внутренней ошибке сервера HTTP 500, понадобятся все возможные способы устранения возникшей проблемы, которые рассмотрены в этой статье. Надеюсь, это руководство поможет вернуть сайт в рабочее состояние в кратчайшие сроки.
- Краткая справка: внутренняя ошибка сервера 500 в WordPress
- Создайте резервную копию сайта
- Перезагрузите страницу
- Проверьте журнал сервера
- Очистите кэш браузера
- Проверьте доступность панели администратора
- Отключите тему оформления или плагин, вызывающие ошибку
- Проверьте файл .htaccess
- Увеличьте лимит памяти для PHP
- Проверьте права доступа
- Переустановите WordPress
- Обратитесь в техподдержку
- Обратитесь к специалисту по отладке
- Заключение

Подобное сообщение уведомляет пользователей о том, что неполадка в работе WordPress-сайта возникла на стороне сервера. В браузерах посетителей сайт не отображается. Эта ошибка особенно опасна тем, что может помешать входу в панель администрирования.
Вопреки распространенному мнению, подобная ошибка не связана с неполадками в работе сервера. Она указывает на проблему с корневым каталогом WordPress-сайта. Это означает, что для обнаружения истинной причины возникшей проблемы понадобится немало проб и ошибок. В зависимости от используемого браузера, сообщение об ошибке выглядит по-разному:
- 500 internal server error (500 внутренняя ошибка сервера);
- Internal server error (внутренняя ошибка сервера);
- Error 500 (ошибка 500);
- HTTP error 500 (HTTP ошибка 500);
- HTTP error 500-internal server error (HTTP ошибка 500 – внутренняя ошибка сервера);
- Temporary error (500) (временная ошибка 500);
- Error code: 500 (код ошибки: 500).
Независимо от формата сообщения, ошибка 500 возникшая на WordPress, негативно повлияет на индексирование в поисковиках, репутацию, трафик, и, конечно же – продажи. Ниже приведена инструкция с перечнем наиболее эффективных методов решения проблемы.

До начала каких-либо действий по поиску причин возникновения ошибки 500 следует провести резервное копирование сайта, если бекапа у вас нет или он уже устарел. Процесс решения подобной проблемы может вызвать серьезные изменения в корневом каталоге, где хранятся все файлы WordPress. При наличии резервной копии сайта можно не опасаться любых изменений. Используйте плагин для автоматического создания резервной копии, затем сохраните бекап на внешнем носителе или в облачном хранилище.
Это самое первое, что стоит сделать – возможно, серверу просто понадобилось очистить кэш или удалить временные файлы. Внутренние ошибки сервера часто возникают после обновления сайта, активации новой темы, добавления плагинов. Сервер может быть перегружен, и сообщение об ошибке просто исчезнет после перезагрузки сайта. Если такое случается часто – это повод подыскать более надежный хостинг для WordPress.
Также стоит проверить работоспособность сайта с помощью сервиса downforeveryoneorjustforme.com – он покажет, если интернет-ресурс полностью недоступен всем посетителям, либо проблема находится на вашей стороне.
Содержимое лога сервера может пролить свет на причины возникновения проблемы. Журналы сервера предоставляют ценную информацию, и помогут выяснить многие причины возникновения неполадки. Среди возможных причин может оказаться установка некорректной темы оформления, плагина; ошибки при установлении соединения с базой данных.
При ошибках, связанных с базами данных, браузер обычно показывает пустую страницу, которую иногда называют «белым экраном смерти». Вследствие отсутствия соединения с базой на экране не будет никаких данных. Эта неполадка не только уничтожает клиентскую часть сайта, но и лишает администратора доступа в панель управления.
Основные причины подобной проблемы следующие:
- Поврежденный файл базы данных WordPress.
- Повреждение файлов движка WordPress злоумышленниками или вирусами.
- Перегрузка базы данных запросами при большом объеме трафика – такое чаще всего происходит на общих хостингах.
Для решения возникшей проблемы, прежде всего, проверьте корректность параметров конфигурации базы данных, или восстановите базу данных из резервной копии. WordPress также предоставляет встроенный метод исправления нерабочей базы данных следующей командой:
Define(‘WP_ALLOW_REPAIR’, true);

Очистка кэша улучшает производительность браузера и решает многие проблемы с неправильной загрузкой сайтов. Существует множество эффективных и бесплатных утилит для полной очистки кэша.
Попробуйте зайти в панель управления по стандартной ссылке. Если попытка не удалась, сообщение о внутренней ошибке сервера 500 может указывать на проблему с недавно установленными темами оформления и плагинами.

Если вам не удается войти в панель администрирования WordPress для отключения некорректной темы оформления или плагина, придется действовать обходным путем. Способ прост, хотя и займет некоторое время. Понадобится FTP-клиент для прямого доступа к файлам сайт. Скачайте, например, FileZilla, введите в параметрах соединения адрес сайта, логин и пароль, подключитесь к серверу – файлы вашего сайта будут в окне справа.
Найдите папку под названием plugins и переименуйте ее в plugins_deactivate. Все плагины будут отключены. Перезагрузите сайт – если ошибка исчезла, значит, причина была в плагине. Теперь вы можете войти в панель администрирования. Войдите и начните активировать плагины по одному. Перезагружайте сайт после активации каждого плагина – так вы обнаружите проблемный. Удалите его, найдите ему замену или уведомите разработчика о проблеме, с которой вы столкнулись. Не забудьте вернуться в FTP-клиент и переименовать директорию обратно, чтобы исправные плагины стали активными.
Если окажется, что ошибку вызывают не плагины, проделайте эти же самые шаги, последовательно проверяя все темы оформления в папке themes. Удалите проблемную тему оформления и перезагрузите сайт.

Установка новой темы оформления или плагина могут вызвать изменения в файле .htaccess, что также может стать причиной сообщения о внутренней ошибке сервера. Эту проблему легко решить с помощью FTP-клиента.
Найдите файл .htaccess, кликните по нему правой кнопкой мыши и переименуйте в .htaccess_old. Перезагрузите файл – если сообщение об ошибке исчезло, значит, проблема действительно была связана с файлом .htaccess. Войдите в панель администрирования, выберите раздел «Постоянные ссылки» в меню «Настройки», затем нажмите кнопку «Сохранить изменения». Эта процедура восстановит оригинальный файл .htaccess и избавит вас от ошибки 500.
Если ваш WordPress-сайт использует множество скриптов, перегружающих доступный объем памяти, это также может стать причиной возникновения ошибки 500. Объем памяти регулируется настройками хостинга и движком WordPress. Увеличить объем памяти для PHP можно несколькими способами.
- Изменить параметры в файле wp-config.php. Зайдите в папку сайта с помощью FTP-клиента, найдите файл wp-config.php, кликните по нему правой кнопкой мыши и выберите в контекстном меню пункт «Просмотр/Редактирование». В качестве редактора по умолчанию можно использовать «Блокнот». Перед строкой «Happy Blogging» добавьте следующий фрагмент кода:
define(‘WP_MEMORY_LIMIT’,’64’);
Сохраните отредактированный в «Блокноте» файл на своем жестком диске, найдите его в левом окне FTP-клиента, кликните по нему правой кнопкой мыши и выберите в контекстном меню пункт «Загрузить». Если после перезагрузки сайта ошибка 500 исчезла – проблема была в доступном объеме памяти.
- Отредактировать файл php.ini. Чтобы найти этот файл, активируйте опцию «Показывать скрытые файлы»; файл php.ini расположен в подкаталоге wp-admin корневой директории. Откройте файл php.ini, найдите строку, начинающуюся с «memory_limit». Если указанное значение составляет 64 Мб и менее, замените его новым параметром:
Если вам не удалось найти файл php.ini, создайте его самостоятельно с помощью программы «Блокнот». Вставьте в созданный файл приведенный выше код и загрузите его на хостинг, в папку wp-admin.
- Изменить файл .htaccess. С помощью FTP-клиента найдите файл на хостинге и добавьте в него следующую строку:
php_value memory_limit 256M
Это увеличит лимит памяти до 256 Мб. Если вы не смогли найти файл .htaccess – активируйте опцию «Показывать скрытые файлы» или создайте подобный файл самостоятельно, после чего загрузите его в папку wp-admin.
Чтобы избежать повторного появления ошибки 500, придется выяснить, какой именно компонент сайта перегружает память. Это может быть некорректно написанный плагин или тема оформления. Можно обратиться за помощью в техподдержку хостинга – специалисты смогут выявить проблемный компонент с помощью журнала сервера.
В соответствии с правилами безопасности WordPress, протокол назначения прав доступа выглядит следующим образом:
- Все директории должны иметь права 755 или 750.
- Для файлов назначают права 644 или 640, кроме файла wp-config.php, который должен иметь права 400 или 440 с целью обеспечения защиты от несанкционированного доступа.
- Ни в коем случае не назначайте права 777 для директорий.
Если права доступа имеют какие-либо другие параметры, возможно появление ошибки 500. Параметры можно проверить с помощью FTP-клиента – они указаны в «Разрешениях». Если вы обнаружите файл или папку с правами доступа, отличающимися от регламентированных – кликните правой кнопкой и измените соответствующий параметр на правильный.

Системные файлы могут повреждаться со временем, в таком случае понадобится переустановка WordPress. Такие повреждения случаются редко, но если все рассмотренные выше методы не помогли, это единственный оставшийся вариант. Переустановка ничем не отличается от первоначальной установки WordPress – скачайте свежий установочный файл с www.wordpress.org и установите WordPress на свой хостинг.
Установочные файлы находятся в папке WordPress. Подключитесь к серверу с помощью FTP-клиента, найдите папки wp-admin и wp-includes, начните загрузку файлов. Когда появится запрос о действиях с существующими файлами, выберите «Переписать». Эта операция заменит все старые файлы в директориях wp-admin и wp-includes новыми. Если после перезагрузки сайта все заработает правильно – проблема была в поврежденных файлах WordPress.
Если все приведенные выше способы не решили проблему, обратитесь в техподдержку хостинга. При выборе надежного хостинга для WordPress всегда важно учитывать наличие в штате специалистов, имеющих опыт в решении проблем с внутренней ошибкой сервера 500. Специалисты исправят подобную ошибку самостоятельно или проведут владельца сайта шаг за шагом через все этапы, необходимые для решения проблемы.
WordPress включает в себя инструмент для тестирования и отладки. Он пригодится, если источник возникшей проблемы остается неясным. В ходе отладки в файл wp-config.php вставляют фрагменты кода, который поможет определить причины неполадок. Результаты тестов записываются в файл, расположенный в корневом каталоге. Для интерпретации и последующей настройки лучше обратиться к опытному профессионалу: новичку сложно отличить незначительную ошибку от серьезной. Кроме того, в процессе тестирования фрагменты кода могут быть видны посетителям сайта.
Внутренняя ошибка сервера 500 досадна – особенно потому, что причины ее появления часто неясны, а единственного простого решения не существует. Приведенные в этой статье методы не требуют навыков программирования, но в большинстве случаев помогут решить возникшую проблему.
Если сайт расположен на бюджетном общем хостинге, лучше сменить тарифный план или выбрать хостинг-провайдера, который возьмет на себя обязательства по обеспечению стабильной работы вашего интернет-ресурса.
Большинству из нас, будь то разработчики, дизайнеры или даже конечные пользователи, приходилось хотя бы раз в жизни пережить. То есть болезненный процесс получения внутренней ошибки сервера и попытки ее исправить. Многие люди не хотят знать больше – они просто хотят это исправить. Но если вы не попытаетесь хотя бы понять это, вам придется чаще страдать от этой участи. Ошибка внутреннего сервера 500 очень важна, поскольку она полностью останавливает все процессы и может вывести из строя весь ваш сайт. Так что, если мы когда-нибудь захотим от него избавиться, нам нужно сначала лучше понять, что это значит.
В этой статье я расскажу, что означает эта ошибка, как определить проблему и, конечно же, как ее исправить. Но прежде чем начать, я хочу провести вас через различные существующие ошибки http (сайта) и то, что они потенциально могут означать. Если хотите, можете сразу перейти к тому, как исправить ошибку WordPress 500.
Общие коды состояния и ошибок HTTP
Перво-наперво – я собираюсь объяснить, что на самом деле означают эти ошибки. В настоящее время существует список состояний и ошибок для HTTP, к которым можно получить доступ, чтобы лучше устранить проблему. Эти ошибки обычно делят по типам. Итак, чтобы сократить этот вопрос, мы рассмотрим наиболее важные ошибки и информационные коды состояния, которые вы найдете при работе со своим сайтом WordPress.
100x ответ (статус)
Этот тип ответа предоставляется непосредственно веб-сервером. В зависимости от вашей хостинговой компании ответ может быть предоставлен Apache, nginx или любым другим веб-сервером, который использует компания. Этот тип ответа не связан с ошибками. Обычно они используются, чтобы указать, что соединение установлено. Это коды состояния ответа на соединения.
200x ответ (успех)
Я называю их успешными. Такой ответ всегда свидетельствует об успехе. Это означает, что либо сервер успешно подключился к вам, что запрашиваемые ресурсы были предоставлены правильно, либо было установлено прокси-соединение.
Самый распространенный успешный код известен как 200 OK. Вы можете увидеть примеры этого, если используете инструмент тестирования скорости WordPress, скажем, в Pingdom Tools, и пытаетесь узнать FTTB (первый раз в байтах). Ответ 200 OK всегда выдается на первый сделанный запрос.
300x ответ (перенаправления)
Ребята перенаправления. Эти коды всегда передаются, если данная ссылка переадресовывается. 300 кодов состояния указывают на успешное перенаправление и также не считаются ошибкой.
Предположим, у вас есть сайт SSL (HTTPS), и у вас также есть прямой доступ к HTTP (незащищенный), и вы хотите перенаправить всех на HTTPS-версию своего сайта. Вы можете создать перенаправление для всех запросов, поступающих с HTTP, на HTTPS. Если вы случайно попытаетесь зайти на свой сайт по HTTP, ваш браузер получит ответ 300, указывающий на перенаправление на версию HTTPS.

Другой распространенный пример, с которым вы, возможно, знакомы, – это локальные перенаправления для SEO. Возможно, вы удалили старые сообщения или страницы. С помощью такого плагина, как Yoast SEO, вы можете 301 перенаправить их на новые, более релевантные страницы. Или используйте временное перенаправление 307, если вы работаете над обновлением и хотите ненадолго перенаправить пользователей на другую страницу.
Ответ 400x (ошибки клиента)
Известные клиентские ошибки. Эти типы ошибок связаны с проблемами в вашем браузере. Как правило, не удается загрузить определенный актив (наиболее известной является ошибка 404). Это коды ошибок, которые не считаются серьезными.
Та же ошибка может появиться, если вы попытаетесь получить доступ к несуществующему изображению на вашем сайте. Например, вы можете использовать перенаправление 410, чтобы сообщить поисковым системам, что контент был окончательно удален, или 451, если вы сделали страницу недоступной по юридическим причинам (например, по запросу DMCA).
Ответ 500x (ошибки сервера)
И вот мы подошли к нашему главному герою. 500 ошибок. Как видите, это важные ошибки, которые всегда связаны с самим сервером. Ошибки сервера важны, потому что они могут привести к сбою вашего сайта. Из этих ошибок наиболее важными являются:
- Услуга A 503 недоступна
- Ошибка 502 неверного шлюза
- Внутренняя ошибка сервера 500
Давайте рассмотрим 3 из них в порядке важности.
сервис 503 недоступен
Наименее серьезным является недоступность службы 503. Если эта ошибка появляется, у вас проблема с ресурсами на веб-сервере. Почти всегда это появляется, когда ваш сервер перегружен. Проще говоря, если вы видите эту ошибку, знайте, что она временная и напрямую связана со слишком большим объемом трафика, и это приводит к перегрузке процессора. Когда ЦП и сам веб-сервер не могут обрабатывать больше входящих подключений, потому что он достиг 100% загрузки ЦП, вы увидите это всплывающее окно с ошибкой.
Вы можете исправить это, либо переключившись на лучший веб-сервер (например, с Apache на Nginx), либо внедрив плагин кэширования WordPress на свой сайт.
502 Неверный шлюз
Это то, что я назвал ошибкой неправильной конфигурации. Эта ошибка не появляется без причины. Если у вас когда-либо возникала эта ошибка, скорее всего, причина в том, что вы что-то сделали, но сделали это неправильно. Обычно это происходит, когда люди пытаются настроить Apache и конфигурацию PHP или при попытке оптимизировать nginx. Плохой шлюз – это ошибка, которая почти всегда возникает, когда PHP FPM (Fast Process Manager) теряет соединение. Либо из-за неправильной настройки, либо из-за сбоя процесса. Это приводит к тому, что веб-сервер отвечает неверным шлюзом.
Самый простой способ исправить эту ошибку – дважды проверить конфигурацию PHP-FPM, поскольку это наиболее вероятная причина этой ошибки. Это происходит чаще на стороне Nginx, чем на Apache, и почти никогда не происходит на службах хостинга, предоставляемых cPanel или Plesk. На последних двух панелях предусмотрены меры предосторожности для предотвращения ошибки неправильной конфигурации. Но это происходит очень часто при управлении собственным VPS.
Нужна дополнительная помощь с этим? Следуйте нашему руководству о том, как исправить ошибку 502 неверного шлюза.
500 – внутренняя ошибка сервера
Большой плохой мальчик ошибок. Внутренняя ошибка сервера 500 – худшая из них, прежде всего потому, что это такая общая ошибка. Если у вас нет достаточных знаний о том, как с этим бороться, это может стать настоящей болью, поскольку может вывести из строя весь ваш сайт. Ошибка 502 неверного шлюза также вызывает сбой вашего сайта, но ее легче диагностировать и исправить. Как уже упоминалось, это почти всегда связано с конфигурацией FPM.
Причины 500 внутренних ошибок сервера и способы их устранения
Первое, что нужно понять об ошибке 500, – это то, что она может быть вызвана рядом различных факторов, которые почти всегда связаны с сбоями в выполнении кода. Вместо того, чтобы пытаться диагностировать все сразу, я дам вам список ошибок по типу проблемы и тому, что вы делали.
- Путем переноса старого сайта на новый хостинг
- Ошибка в .htaccess в конфигурации apache
- Ошибка выполнения PHP-кода
Существуют и другие, менее распространенные случаи, которые могут вызвать внутреннюю ошибку сервера 500, но для простоты и удобства использования этой статьи я сосредоточусь на этих трех.
1 Перенос старого сайта на новый хостинг
Эта ошибка может появиться несколькими способами, но почти всегда кажется, что это связано с версией PHP, привязанной к вашему веб-серверу. Более новые версии PHP могут немедленно вызвать внутреннюю ошибку сервера 500, если текущий сайт или плагины не поддерживают текущую версию.
Эта ошибка является классической, например, когда вы переносите свой сайт с посредственного хостинга со старой версией PHP на более новый хостинг, который принимает только более новые версии (7.0 и выше). Если ваш сайт не обновлялся в последнее время, возможно, проблема связана со старым плагином. Я называю это «внутренней ошибкой сервера миграции», потому что это почти всегда происходит при миграции сайта.
Решение
Лучший способ исправить эту ужасную ошибку, когда вы так сильно пытаетесь перенести свой сайт WordPress на новый хостинг, – это сделать полную копию ваших плагинов и темы вашего сайта. После этого удалите все плагины со своего сайта и попробуйте еще раз. Если ошибка исчезнет, почти гарантировано, что ошибка была сгенерирована более новой версией PHP на вашем хостинге, которая просто отказывается выполнять код в вашем более старом плагине. Повторно загружая один плагин за раз, вы можете легко узнать, какой из них вызвал проблему.
Эти ошибки почти всегда проявляются при переносе старых сайтов, работающих на PHP 5.4 и 5.6, на новый хостинг с PHP 7.0, 7.1 или 7.2.
То же самое относится и к вашей теме. Поскольку темы могут реализовывать и реализуют дополнительный PHP-код в файлах functions.php, single и page.php. Скорее всего, более старая тема без обновлений может сломать ваш сайт после переноса на хостинг с более новой версией PHP. Эта ситуация прискорбна, поскольку единственный способ исправить это – изменить тему и перестроить ваш сайт. Это наихудший сценарий.
2 Ошибка конфигурации .htaccess Apache
Допустим, вы настраивали плагин, и вдруг все вылетает. Если вы получаете внутреннюю ошибку сервера 500 при настройке, например, плагина кэширования или любого плагина, связанного с оптимизацией, вам необходимо проверить, добавил ли плагин дополнительный код в ваш файл .htaccess.
Поскольку apache можно изменять в реальном времени, настраивая функции в файле .htaccess (который почти всегда скрыт), неправильная конфигурация может нарушить работу вашего сайта.
Решение
Чтобы исправить это, либо войдите в свой сайт через FTP и измените файл .htaccess, либо путем прямого редактирования, например, с помощью проводника файлов на cPanel или Plesk.
Если вы не знаете, как отменить то, что сделал плагин, и вам снова нужен ваш сайт, сделайте копию существующего содержимого в виде текстового файла. Сохраните это как резервную копию. Затем замените весь .htaccess следующим кодом:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule. /index.php [L]
</IfModule>
# END WordPress
Это файл .htaccess WordPress по умолчанию. Он должен работать с любым сайтом. Итак, если вы в отчаянии и не знаете, какую часть удалить, просто удалите все и вставьте этот код. Он мгновенно вас спасет. Позже вы можете удалить плагин или попробовать настроить его снова. Теперь вы знаете, как спасти вас от этой катастрофической ошибки. По крайней мере, если это связано с .htaccess.
Если вы не знаете, связана ли это с .htaccess, или эта ошибка начала появляться, даже если вы не касались каких-либо плагинов, не рискуйте. Просто скопируйте содержимое вашего .htaccess и скопируйте приведенный выше код, чтобы попытаться диагностировать. Если это не помогло, оставьте .htaccess как есть, а затем попробуйте следующее предложение.
3 Ошибка выполнения кода PHP.
Ошибки такого типа встречаются чаще, чем вы думаете, и обычно они возникают, если плагин выполняет недопустимый код. Самый распространенный способ выполнения недопустимого кода – это попытка выполнить устаревшие инструкции. Возможно, вы пытаетесь запустить старый плагин, который был разработан для работы только с PHP 5.4 или 5.6 с PHP 7.0 или более новыми версиями. Устаревшие и недопустимые функции вызовут внутреннюю ошибку сервера, которую можно диагностировать только путем включения режима отладки WP.

Включить wp_debug
Режим отладки WordPress предоставит вам подробную информацию об ошибке, которая остановила выполнение. Мы включаем его, изменяя значение с «false» на «true» в wp_debug внутри файла wp-config.php в корневой папке вашего сайта.

Если вы используете Plesk или cPanel, вы можете сделать это, просто изменив это значение с помощью проводника и отредактировав wp-config.php. Вы также можете следовать этому руководству по отладке от Blogvault, чтобы получить более подробные инструкции.
Как только файл будет отредактирован, вы сможете увидеть фактическую ошибку, которая остановила выполнение. В ошибке также будет указан путь и файл, в котором это произошло, поэтому легко догадаться, какой плагин вызвал ее. При отключении его можно пропустить ошибку, а затем обновить плагин или удалить его, в зависимости от ситуации.
Решение
Подавляющее большинство случаев внутренней ошибки сервера 500 связано с более старыми версиями тем или плагинами. Переключив вашу тему на любую стандартную тему WP, вы сможете восстановить доступ к своему сайту. Отключение конфликтующих плагинов также вернет вам доступ к панели управления. Если вы столкнулись с ситуацией, когда ваша тема является ответственной за нарушение работы сайта, лучший способ исправить это – создать zip-файл указанной темы из папки темы wp-content / themes / yourtheme, а затем удалить его из твой сайт. Это устранит ошибку, и вы сможете восстановить доступ к своему сайту. Затем вы можете повторно загрузить его и обновить, не активируя. То же самое можно сделать и с плагинами.
Наиболее частые ситуации для 500 внутренних ошибок сервера можно исправить обновлением. В случаях, когда для указанного плагина / темы нет доступных обновлений, вы можете попробовать переключиться на более старую версию PHP. Но знайте, что это временное решение. Новые версии PHP становятся стабильными, а старые версии регулярно объявляются устаревшими. Рано или поздно ваш сайт точно перестанет работать. Лучшим подходом всегда будет обновить или удалить / заменить соответствующие плагины.
Всегда помните, что лучше предотвратить и обновить, чем пытаться устранить повреждения позже.
Завершение нашего руководства по внутренним ошибкам сервера WordPress 500
Внутренняя ошибка сервера WordPress 500 может стать настоящей проблемой. Но в большинстве случаев их можно легко диагностировать и исправить, просто удалив / обновив конфликтующие части вашего сайта. Хотя могут быть ситуации, когда эти ошибки выходят за рамки нормы (например, при разработке плагина), это выходит за рамки цели данной статьи.
Для подавляющего большинства людей приведенный выше совет должен решить вашу проблему. Помните, что wp-debug – ваш лучший друг, и всегда внимательно следуйте инструкциям. Ваш сайт будет снова в сети в кратчайшие сроки.
Остались вопросы? Или советы по устранению внутренней ошибки сервера WordPress 500? Дай мне знать!
Источник записи: https://www.wpexplorer.com
Updated on May 6, 2022

http error 500 wordpress
So, out-of-the-blues there is a 500 Internal Server Error in WordPress is one of those common wordpress errors that create the most panic because, when it arrives, we usually have no idea why. But, rest assured, it is very common and can be solved. One of the most common reasons for this error is your .htaccess file. We will talk about this and few other things to fix wordpress 500 internal server error.
Are you getting Error 500 message when trying to access wp-admin dashboard or after changing url ?
Are you not able to log into admin page (HTTP 500 error)?
Fixing 500 internal server error will require troubleshooting that will take time and patience. This in depth tutorial on how to fix 500 internal server error in wordpress is created especially in order to offer some advice for those who encounter this problem, but also to give solutions to fix it.
There are a few common causes, such as having a corrupted .htaccess file, exceeding your PHP memory limit, and having improper file permissions.
Few other common wordpress errors you might need help with.
- WordPress White Screen of Death (WSOD) Error
- Incorrect WordPress File And Folder Permissions Error
- “The link you followed has expired” in WordPress error
- Pluggable.php File Errors WordPress
- Upload: Failed to Write File to Disk WordPress Error
- Are You Sure You Want to Do This Logout Error WordPress
- HTTP Image Upload Error WordPress
- 503 Service Unavailable Error in WordPress
- WordPress Stuck in Maintenance Mode
- Parse Error: Syntax Error Unexpected in WordPress
- This Account Has Been Suspended WordPress issue
- Error Establishing a Database Connection in WordPress
- Sorry, This File Type Is Not Permitted For Security Reasons WordPress issue
What is a 500 internal server error in WordPress?
500 Internal Server Error is a common error message that indicates a PHP error or server problem. The 500 internal server error in wordpress is caused by the installation of an incompatible plugin, a plugin that uses too much memory, or any other plugin that causes conflict with the current setup of the site.
For example, recently I had to remove a spammy plugin and then reinstall it to fix 404 not found errors. Then after it was working fine again, I had to remove it again because I was getting 500 Internal Server Error in WordPress.
To fix this error you will have to first troubleshoot the problem and eliminate possible causes until you get rid of this problem. For more info on what causes 500 internal server error please read my previous article: What causes 500 Internal Server Error in WordPress
On the “Internal Server Error” page it says “The website encountered an unexpected condition which prevented it from fulfilling your request.”
This means that your request was processed by the server but due to some reason was not fulfilled properly. This could be due to several factors including:
A 500 Internal Server Error error message suddenly appears on your site when this occurs. There are many causes that can cause it, namely the error configuring the .htaccess file, the contradiction of sessions, very slow loading of the site, the addition of a new file or a new folder on the server or still using too many resources on the server.
This message also appears in the event of an incorrect configuration of a theme or plugin. There are still other causes, but what we have just mentioned are the most frequent. To be able to repair them quickly and efficiently, you must first discover their origin.
Error 500 is an internal server error commonly encountered on WordPress and other sites. When this happens, the 500 Internal Server Error message will appear on your site.

Causes of Error 500 WordPress internal server error
First, let’s discuss some of the causes of HTTP 500 error. If you are getting this error after updating your site, it could be a result of a bad plugin or theme. Deactivating plugins and themes one by one until the error goes away will help you identify the problematic add-on. If you delete any plugin or theme without removing its files properly through FTP, chances are that you will end up with corrupted files which might cause this error to appear. Make sure that you also clear your cache when deleting plugins and themes to improve the performance of your site.
Case 1:
The most frequent cause is a configuration error in the .htaccess file. This is the procedure by which we always start when error 500 occurs since it only takes a few minutes to correct.
Case 2:
When the error appears intermittently and the loading of the site is very slow. Conflicting sessions may be the source of this error. Another reason could be that the WordPress site is using too many resources on the server.
Case 3:
Error 500 appears when you have just added a new file or folder to your server. In this case, the new file or folder does not have the correct authorization number.
The error may have other origins, including a plugin or a misconfigured theme, but it would be complex to name them all here. WordPress site owners who are unfamiliar with 500 error correction are always recommended to seek the help of an expert who could assist with this task.
Obviously, there is always a risk of creating another more serious bug when trying to correct a WordPress error.
The 500 internal server error messages can be viewed in many ways because each website is allowed to customize the message.
Variations for 500 Internal Server Errors
- 500 internal server error
- HTTP 500 – Internal server error
- Temporary Error (500)
- Internal server error
Because the website you’re visiting is causing an error on 500 internal servers, you could see it on any browser on any operating system, even on your smartphone.
In most cases, 500 internal server error in wordpress are displayed in the browser window, as are web pages.
Now, the million-dollar question, what causes the “500-Internal Server Error”?
“Well, There Is No One Word Answer Here.”
As we mentioned above, internal server error messages indicate that something is wrong overall.
In most cases, “wrong” means programming a page or site, but it is likely that the problem is at your disposal, which we will investigate below.
More specific information about the causes of a specific HTTP 500 error is often provided when it occurs on a server that uses Microsoft IIS software. Look for numbers after 500, such as HTTP Error 500.19 – Internal Server Error , which means that the configuration data is incorrect.
A server-side error can happen owning to a variety of factors, spanning from a minute bug into the code to the incorrect uploading of the file.
However, the two most common causes of this WordPress error is the corrupted .htaccess file and second reason, when you’ve exceed the PHP memory limit.
The “.htaccess file” happens whenever you make any change at the backend of the website, like installing a new plugin or modify the error.
On the other hand, the “PHP memory limit” is a scenario when your website has poorly-codded plugins or too many plugins installed.
In many cases, the error 500 is caused by a failure in the .htaccess file of your website.
This does not mean that you have caused it by editing that file, but it may have been due to some process that has been carried out on your website.
How to Fix 500 Internal Server Error WordPress ?
A solution would be to upgrade your web hosting plan. If you are using a shared hosting package, your site might be overloaded due to high traffic and that might lead to this error. It’s important to monitor the amount of resources consumed by different websites hosted on a single server because it can cause serious issues if a single website is overloading the server.
You should also check whether .htaccess file has been edited in any way or not. Sometimes editing .htaccess file can lead to this issue because it is responsible for URL rewriting and rewrites can easily mess up with WordPress core files.
.htaccess file error –
If your .htaccess file is improperly named or has been replaced by another file (such as .htaccess.txt), then you may see the 500 Internal Server Error when trying to access your site.
Solution: Delete any files with the name .htaccess and rename your current .htaccess file to .htaccess.bak so that it doesn’t get overwritten when you upload a new one. Then, upload a new .htaccess file from this article: How To Fix WordPress When You Get A Failed To Open Stream Error Or File Not Found. If you don’t want to mess with an FTP client and can’t log into your server via cPanel, try using these instructions instead: How To Fix WordPress Permalinks When You Get A Failed To Open Stream Error Or File Not Found.

Misconfigured .htaccess file
Look for the .htaccess file on your WordPress site server, then simply change the file name to old.htaccess. This will correct the error in 90% of the cases. If this procedure does not work, try the following.

These are the rules shown in the image above:
#BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#END WordPress
Loading of the site is slow and the error appears intermittently:
Start by deleting the active sessions of your website in your browsing history. If that doesn’t fix the problem, check the error logs and find the source of the 500 error, then check the resource usage in the FTP server.
New file or folder added to the server:
Just change the authorization number for the new file. Find the file (or files) you just added to your server, click the right button of your mouse, then change the authorization number to 644. If it is a folder, change it number for 755.
Each WordPress error has its own way of fixing!
The 500 WordPress error can appear at any time. You should no longer be surprised when you experience this problem. Of course, this error can panic a WordPress beginner. On the other hand, the more you panic, the more the problem will seem huge to you.
The first reflex that you must have when faced with such a situation is therefore to find the cause that may well have triggered this error. Once the origin is detected, you can repair it by following these few tips:
In case of an incorrect configuration of the .htaccess file, you must search for this file on the server of your WordPress site. Once found, simply rename the file to old.htaccess and the error will be corrected automatically in 90% of cases. If the repair was not successful, you can proceed with other techniques.
Check if a new file or folder has just been added to your server. If this is the case, you only have to change its authorization number by clicking the right mouse button on the file found. The authorization number is 644 for a file and 755 for a file.
The other technique is dedicated to repairing an error that appears intermittently after a slow site load. In this case, you must first delete all active sessions from your website that are in your browsing history. In some cases, this is enough to resolve the problem. If not, we recommend that you check the error logs and look for the source of the 500 error so that you can check the resource usage in the FTP server.
If none of these solutions is chosen, do not hesitate to ask your hosting provider for help. You just need to open a technical ticket via the “support” section of your customer area. Thanks to the server logs that the latter keeps, he has every right to get to the bottom of things.
You should know that if you access your WordPress installation through the CPanel of your hosting or by FTP you will find a file called php_errorlog.Php_errorlog file
There you will see a list of errors sorted by the date that can give you a clue to locate the problem.
But since it is an internal server error it may be difficult to interpret the problem so let’s see what steps to take to fix it.
Enable Debugging
To see whether this is the case, you’ll need to edit the wp-config.php file in your website’s root directory. Download the file (via FTP), open it (using a text editor) and search for ‘WP_DEBUG’. If you find the line, simply change false to true and re-upload the file to the server.
If this line isn’t yet in your config file, create it using the following line of code:
define( "WP_DEBUG", true );
Reload your website and see if the error changes.
Methods to fix 500 internal server error wordpress
Error 500 by the .htaccess
We have already seen that the most common is that the error 500 occurs because the .htaccess file is damaged. So we will start here.
Step 1
To check if the error is there, access the files of your WordPress installation (here is a tutorial on how to do it by FTP) and locate the .htaccess file
If you don’t see it, it may be hidden. In that case, you must search among the menus of your FTP program to make the hidden files visible (it is usually in the View menu).
Step 2
As soon as you find it, rename it. For example: .htaccess.old
Rename htaccess

Now go to your website and reload to see if the error has disappeared.
If you have, it is because the internal server error (or error 500) was caused by a failure in the .htaccess. Now follow the instructions in step 3.
In case the error persists, leave the name of the file .htaccess as it was at the beginning and read the solutions below.
Step 3
You must generate a new .htaccess file. To do this, in your WordPress administration panel, go to Settings> Permanent Links and click save changes.
Save permalinks

That will generate a new error free .htaccess file.
Internal server error 500 due to plugins
If the problem was not in the .htaccess it may be in one of the plugins.
Step 1
If you just installed a plugin and the error occurred at that time, you have it easy. Uninstall it and everything will return to normal.
Step 2
But sometimes it is not so easy to locate the problem and it may be due to conflicts between two or more plugins.
In that case, you will have no choice but to disable all plugins. If you do not have access to the WordPress administration panel, you must access it by FTP.
One trick to disable all plugins at once is going to the wp-content folder and rename the folder plugins to plugins.deactivate
If the 500 error has disappeared, and you can access the administration panel, you will know that it was caused by one of the plugins.
Step 3
Now go activating them one by one again and checking if any of them give an error. This way you will find the plugin that is causing the scare and you can find an alternative to it.
If you haven’t fixed error 500, read on.
HTTP 500 Error due to theme
If you have not solved the error, the cause may be your WordPress theme. Activate any other theme, for example, one that WordPress has by default.
If the problem persists, read on.
Error 500 Due to damaged folders
If you have tried all the steps above and the problem persists you may have to repair the wp-admin and wp-includes folders .
Don’t worry because this will not delete any information from your website.
To repair them you just have to download the latest version of WordPress from wordpress.org, unzip the .zip file, copy the wp-admin and wp-includes folders and replace them with those from your website.
WordPress error 500 due to memory limit
If you have followed all the steps above and the error still persists, it could be a memory problem on the server.
For some reason (that your hosting provider can explain) something is causing your server memory to run out.
To fix it, it should be enough to increase the memory limit.
For this you can create a text file called php.ini and include the following code in it:
memory = 128MB
Then save the file in the / wp-admin / folder of your WordPress installation.
To make your task easier, you can directly download the prepared php.ini file here.
Another option is to edit the wp-config file of your WordPress installation, adding the following line of code:
define ('WP_MEMORY_LIMIT', '128M');
Check File Permissions
In your directory, WordPress permissions for folders and files should be 755 or 644. Setting permissions to anything else may cause problems, including 500 internal server errors.Make sure these are not set to anything other than 755 or 644.
The first thing to do to fix a WordPress 500 error the first time is to check the .htaccess file. When you have changed the file name, load the site to see if everything is set or not. In case of failure, it is advisable before moving on to something else to go to “Settings”, then to “Permalinks” found in your WordPress dashboard. Then click on the “Save” button which allows you to create a new file.
Among the other methods that you should adopt to repair a WordPress 500 error is increasing the memory limit size of PHP. Please note that this type of error may appear if your PHP memory limit is exhausted. To increase the memory limit size of PHP, the first thing to do is to create an empty text file called php.ini.
Then, you will paste this code into the file memory = 64MB. After saving the latter, launch the download in your folder/wp-admin/via FTP. If the memory limit is exhausted, it means that there is something that consumes your memory largely.
This remains to be determined so that the problem of this kind does not repeat itself. Be aware that this may well be a theme function or a poorly coded plugin. Only your hosting company can help you perform accurate and precise diagnostics by looking in the server logs.
Contact your HOST
Still cannot find a solution, your host may have it. it’s important that you go through all of these steps so you can explain to them that you’ve checked every nook and cranny of your file system and can’t find a single issue that would lead to the 500 internal server error that’s running on your site.ask them to check their server logs to see if the issue is there.
If you still get a 500 Internal Server Error on WordPress, the server is not working and you can go back to the host and provide them this URL stating it should load as it is only a 1 line file that does not depend on anything to load.
WordPress Core Issue
Your core WordPress installation may have an issue. This could be files missing, changed or corrupted. You want to make sure that your core WordPress installation is fresh and new to rule out this being the cause of your server WordPress 500 Internal Server Error.
Manually remove and re-install WordPress core files.
- Get the latest WordPress zip (or tar.gz) file.
- Unpack the zip file that you downloaded.
- Deactivate plugins.
- Delete the old
wp-includesandwp-admindirectories on your web host (through your FTP or shell access). - Using FTP or your shell access, upload the new
wp-includesandwp-admindirectories to your web host, in place of the previously deleted directories. - Upload the individual files from the new
wp-contentfolder to your existingwp-contentfolder, overwriting existing files. Do NOT delete your existingwp-contentfolder. Do NOT delete any files or folders in your existingwp-contentdirectory (except for the one being overwritten by new files). - Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
NOTE – you should replace all the old WordPress files with the new ones in the wp-includes and wp-admin directories and sub-directories, and in the root directory (such as index.php, wp-login.php and so on). Don’t worry – your wp-config.php will be safe.
Switch to a Default Theme
If deactivating your plugins didn’t solve the issue, it’s likely your theme’s the culprit. You can verify this easily by switching to a default WordPress theme. I recommend using Twenty Sixteen, which is the latest default theme. If switching to Twenty Sixteen solves the problem, you can re-enable all plugins and get to work finding the issue in your theme’s code.
PHP Version Issues
While old PHP versions usually don’t cause 500 internal server errors, it may be worth talking to your host and asking them to give you a newer version before spending valuable time and money
Ask your host what version of PHP you’re running.
Disabling all plugins in case of 500 error in WordPress
If none of the solutions mentioned above are effective, it can probably mean that the problem is caused by a specific plugin. As it will be difficult to detect, deactivating all WordPress plugins at the same time is, therefore, the best solution.
Then activate the extensions one by one until you find the plugin that caused the error.
Once detected, get rid of it and don’t forget to report it to its author. If this option to deactivate extensions could not fix the error, you can return the basic files, i.e. change the wp-includes and wp-admin files to new ones. This can be useful if a file has been corrupted.
If you are unable to resolve the 500 Internal Server Error problem with these different methods, contact your web host who will be able to debug the problem faster and more efficiently.
It is important to inform your web host of all the steps and techniques that you have tried to try to resolve your problem.
By the way, don’t forget to make a backup before dealing with the problem. It is so easy that you have no excuse not to do it.
Take advantage of the expertise of the professionals at WP hacked help. Our WordPress experts are reliable, competent, and they all have several years of experience in repairing and fixing common wordpress errors and issues. We can quickly fix 500 internal server error on your WordPress site .
If you need to fix http 500 error in WordPress site, we will be happy to provide you with solutions to correct the situation. Get in touch with us without delay to discuss your error to be corrected on your WordPress site.

