WordPress post error 500

Столкнулись с ошибкой 500 Internal Server Error в WordPress? Ну что же, вы не одни! Ошибка 500 Internal Server

Сен 28, 2022

Elena B.

7хв. читання

Как Исправить Ошибку 500 Internal Server Error в WordPress

Столкнулись с ошибкой 500 Internal Server Error в WordPress? Ну что же, вы не одни! Ошибка 500 Internal Server Error — одна из самых распространённых ошибок с которой сталкиваются пользователи WordPress. Среди возможных причин появления ошибки: повреждённые файлы .htaccess, неправильно установленные права, задержки скрипта, неправильная версия PHP или неудачное обновление WordPress.

Однако выявить истинную причину не так просто, как, например, в случае ошибки 404, которую могут вызвать либо неработающие постоянные ссылки, либо изменённые URL-адреса страниц.

Вот краткое руководство по исправлению ошибки 500 в WordPress с помощью 9 различных способов. Давайте не будем терять время и начнём данное руководство по WordPress.

Обратите внимание, что Hostinger предлагает специальный оптимизированный для WordPress хостинг. Воспользуйтесь предложением и получите WordPress хостинг со скидкой до 82%!

К предложению

Что вам понадобится

Перед тем, как вы начнёте это руководство, вам понадобится следующее:

  • Доступ к панели управления вашим хостингом
  • Доступ к панели управления WordPress

ВАЖНО! Безопасность прежде всего. Перед началом данного руководства, мы рекомендуем произвести резервное копирование вашего сайта для предотвращения потери данных.

Способ 1 — Ошибка 500 в WordPress из-за плагинов или тем

В большинстве случаев, ошибка 500 Internal Server Error возникает из-за установки или обновления плагинов или тем. Если вы уже знаете какой из плагинов мог вызвать данную проблему, вы уже на пол пути к её решению.

Способ 1.1 — Ошибка 500 в WordPress из-за обновления или установки плагина

Если страница перестала работать после установки или обновления плагина, вы можете починить её, просто отключив или удалив плагин. В зависимости от ситуации, существует два пути для достижения цели.

Отключение плагинов через панель управления WordPress

Если вы можете войти в  вашу панель управления WordPress, следуйте данным этапам:

  1. Войдите в вашу панель управления WordPress.
  2. Нажмите на Плагины → Установленные в левом меню навигации.

hostinger плагины установленные

  1. Отключите проблемный плагин.

hostinger plagini deactivirovat

  1. Обновите сайт в браузере, чтобы проверить решена ли проблема.
  2. Если нет, отключите другой плагин и повторяйте данный процесс, пока все плагины не будут отключены (или сайт не заработает).
  3. Как только вы найдёте плагин, ответственный за появление ошибки, попробуйте переустановить его заново. Вы также можете поискать другие плагины на его замену или связаться с разработчиками плагина для уточнения информации о его работе на вашем WordPress.

Отключение плагинов WordPress через Файловый Менеджер или FTP

Существуют ситуации, когда ошибка не позволяет получить доступ к панели управления WordPress. В этом случае, вам придётся отключить или удалить плагин с помощью Файлового Менеджера в панели управления вашим хостингом или FTP-клиентом вроде FileZilla.

  1. Пройдите в корневой каталог вашего WordPress и войдите в папку wp-content/plugins.
  2. Найдите проблемный плагин и переименуйте его для отключения. К примеру, вы можете добавить .отключён в конец файла, чтобы не забыть об этом плагине. Если вы хотите удалить его полностью, просто удалите папку с плагином.

hostinger ошибка 500 плагины

  1. После этого, обновите ваш сайт. В случае, если проблема остаётся, произведите данные действия для оставшихся плагинов до их полного отключения (или пока ваш сайт не заработает).
  2. Как только вы найдёте сломанный плагин, вы можете попытаться переустановить его, найти замену или связаться с разработчиками плагина для получения консультации.

Способ 1.2 — Ошибка 500 в WordPress из-за установки или обновления темы

Если ваш сайт перестал работать после установки или обновления темы, вы можете решить проблему изменив тему вашего сайта. Для этого существует два пути:

Изменение темы с помощью панели управления WordPress

Если вы можете получить доступ к вашей панели управления, вот что вы должны предпринять:

  1. Перейдите в раздел Внешний вид → Темы.

hostinger внешний вид темы

  1. Выберите любую другую тему и нажмите кнопку Активировать.

hostinger внешний вид темы 2

  1. Как только вы закончите изменение темы, вы увидите подтверждающее сообщение со ссылкой на ваш сайт.

hostinger внешний вид тема активирована

Изменение темы с помощью phpMyAdmin

Другой способ для изменения темы, это редактирование значений вашей базы данных MySQL через phpMyadmin, в панели управления вашим хостингом. Этот способ может быть полезен, если ваша панель управления WordPress не работает. Вот, что вы должны сделать:

  1. Найдите таблицу wp_options и откройте её.

hostinger php my admin

ЗАМЕТКА! В зависимости от значений таблицы, выбранных вами в процессе установки, префикс таблиц не всегда будет wp_.

  1. Перейдите на Страницу 2.

hostinger phpmyadmin 2

  1. Найдите раздел template и stylesheet

hostinger phpmyadmin 3

  1. Узнайте название темы на которую вы хотите её поменять. Для этого перейдите в каталог  wp-content/themes с помощью Файлового Менеджера.

hostinger phpmyadmin 4

  1. Скопируйте название темы, которую вы хотели бы использовать. Далее, измените значения template и stylesheet в базе данных на название вашей новой темы. В данном примере, мы изменим тему twentyfifteen на twentysixteen

hostinger phpmyadmin 5

Теперь вы снова можете перезагрузить ваш сайт в браузере, и он загрузится с новой темой. Если ошибка 500 была связана с вашей старой темой, то это должно решить проблему. Вы можете попытаться переустановить вашу старую тему или связаться с разработчиком для получения информации о правильной установке темы для вашего WordPress.

Способ 2 — Проверка файла .htaccess

Ещё одним способом для избавления от ошибки internal server error, является проверка состояния вашего файла .htaccess. Вероятность того, что ваш нынешний файл .htaccess был повреждён, весьма высока. Это могло случиться из-за огромного количества причин; самые распространённые из них это установка нового плагина или другие изменения на вашем сайте.

Лучшим методом для проверки состояния вашего файла .htaccess является создание нового. Всё, что вам нужно сделать это:

  1. Войти в панель управления вашим хостингом, далее в Файловый Менеджер в разделе Файлы. Альтернативный способ, это использовать FTP-клиент вроде FileZilla.
  2. Перейдите в корневой каталог вашего WordPress сайта (если вы видите файлы вроде wp-content и wp-includes, вы в правильном месте).
  3. Найдите здесь файл .htaccess и отключите его. Это можно сделать задав ему другое имя. К примеру, .htaccess1.

hostinge ошибка 500 htaccess

  1. После этого, создайте новый файл .htaccess и вставьте в него стандартный код .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
  1.  Убедитесь, что сохранили файл.

Теперь, откройте ваш сайт в браузере и посмотрите исправлена ли ошибка. Если нет, продолжите чтение руководства.

Способ 3 — Увеличение лимитов PHP

Если два способа описанных выше не принесли никакого результата, то неправильные значения PHP или нехватка памяти могли стать причиной появления ошибки 500. Это происходит из-за того, что скрипты и плагины требуют определённое количество памяти для своей правильной работы. В дополнение к этому, когда загружается ваш сайт, браузер делает огромное количество запросов для загрузки скриптов, плагинов и контента. Когда количество памяти для загрузки скриптов и плагинов не хватает, WordPress, скорее всего, выдаст ошибку 500 Internal Server Error. Именно поэтому, важно увеличить значение памяти вашего сайта и других PHP настроек. Вы можете это сделать с помощью файла .htaccess. Вот несколько строк, которые мы рекомендуем вам добавить:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
php_value memory_limit 256M

hostinger ошибка 500 htaccess 2

Не забудьте Сохранить изменения. Теперь, обновите ваш сайт. Если проблема возникала из-за недостаточных лимитов PHP, то этот способ должен помочь с её решением.

Способ 4 — Изменение версии PHP

Некоторые скрипты или плагины для WordPress требуют определённую версию PHP. Если рекомендуемые требования для них не выполнены, то в следствии этого может появиться ошибка 500. Вы можете проверить вызвана ли она версией PHP, изменив её. Это можно сделать через панель управления хостингом в разделе Дополнительно → Выбор PHP версии.

hostinger ошибка 500 php версия

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

Способ 5 — Включение отображений ошибок

Поиск причины возникновения ошибки WordPress 500 Internal Server Error — это самая сложная часть в процессе её исправления. Если ни один из предыдущих способов вам не помог, значит вам необходимо начать поиски поглубже — проверив ваши ошибки. Существует несколько способов для этого:

Включение отображение ошибок

Включив отображение ошибок, вы сможете найти определённый код вашего сайта, который её вызывает. Это можно сделать в том же разделе, где мы меняли версию PHP. Дополнительно → Выбор PHP версии. Установите значение Отображать Ошибки на Включена и нажмите кнопку Сохранить.

hostinger ошибка 500 отображать ошибки

Теперь, вы должны перезагрузить ваш сайт. Все ошибки кода будет отображены на экране, как на картинке ниже:

wp ошибка на экране

Как только вы найдёте ошибку, откройте указанный в ней файл и посмотрите нужную строку. Вы можете использовать Google, Stackoverflow, WordPress Форум, или связаться с вашим разработчиком для получения информации о решении данной проблемы.

Способ 6 — Использование отладки WordPress

WordPress имеет свою собственную систему отладки, которую вы можете использовать для решения проблем с вашим кодом. Это также может помочь решить проблему ошибки 500. Для начала её использования, вам необходимо сделать несколько изменений в вашем файле wp-config.php.

  1. Найдите следующую строчку в файле wp-config.php:
define('WP_DEBUG', false);
  1. Удалите и вставьте на её место следующий код:
 // Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
 
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
  1. Обновите ваш сайт и откройте Файловый Менеджер. Перейдите в каталог wp-content и найдите файл debug.log. Откройте редактирование данного файла для просмотра его значений.

wordpress отладка

  1. Теперь вы знаете, что является причиной возникновения ошибки и сможете решить её, обратившись к разработчику или Google, Stackoverflow, WordPress Форуму. Более детальная информации о системе отладки может быть найдена здесь.

Способ 7 — Восстановление резервной копии

Если вы сделали бэкап WordPress до его поломки, восстановление резервное копии тоже может стать решением. Для начала, удалите все файлы WordPress. Затем, загрузите ваш бэкап, перепроверьте, работает ли ваш сайт.

Ручной способ восстановления WordPress может подойти не всем. Если вам кажется это слишком сложным, то мы можем подсказать вам другой способ. К сожалению, это не поможет вам, если ваш сайт не работает, но он точно поможет вам избежать подобных проблем в будущем.

  1. Установите и активируйте плагин All-in-One WP Migration.

hostinger ошибка 500 wp backup

  1. Найдите его в панели управления вашим WordPress и нажмите кнопку Export.

hostinger ошибка 500 wp backup 2

  1. Выберите опцию File (Файл), если вы хотите скачать резервную копию на ваш компьютер.

hostinger ошибка 500 wp резервное копирование

  1. Скачайте сгенерированную резервную копию на ваш компьютер. Она содержит файлы вашего сайта и базы данных.
  2. Теперь в случае появления ошибки 500 Internal Server Error (или любой другой проблемы) и невозможности её решения, вы можете просто восстановить ваш сайт с помощью резервной копии.
  3. Для восстановления сайта с помощью сгенерированной резервной копии, вам необходимо полностью удалить ваш сайт и установить новый WordPress, вместе с плагином All-in-One. После этого, выберите функцию Import (Импорт), выберите сгенерированный бэкап и продолжите процедуру восстановления.

hostinger ошибка 500 импорт

Способ 8 — Переустановка файлов WordPress

Если ошибка ещё появляется, есть кардинальное средство для её решения. Всё, что вам нужно сделать это:

  1. Скачать последнюю версию WordPress.
  2. Сохранить и распаковать её на вашем компьютере.
  3. Удалить файл wp-config-sample.php и папку wp-content для избежания перезаписи важной информации.
  4. Переместить все корневые файлы на ваш хостинг аккаунт и перезаписать их. Это можно сделать с помощью FTP-клиента FileZilla.

hostinge ошибка 500 ftp сайт

  1. Далее, должно появиться окно с разрешением на перезапись файлов. Поставьте значения как на изображении для автоматизации процесса.

hostinger ошибка 500 ftp сайт 2

ЗАМЕТКА! Убедитесь, что вы сделали резервное копирование вашего сайта перед началом данного процесса. Это позволит избежать потери важной информации.

Процесс загрузки может занять от 10 до 20 минут. После завершения, попробуйте вновь обновить ваш сайт в браузере. Если ошибка 500 Internal Server Error была связана с корневыми файлами WordPress, этот способ должен помочь решить проблему.

Способ 9 — Начать всё заново

Если все из приведённых способов вам не помогли, вам придется начать создание вашего сайта с нуля. Хорошей новостью является то, что вы можете восстановить ваш сайт даже с помощью резервной копии базы данных. Загляните в данное руководство для пошаговой инструкции по восстановлению вашего сайта только с помощью базы данных MySQL.

Заключение

Все, кто используют WordPress хотя бы раз сталкивались с ошибкой internal server error. Являетесь ли вы продвинутым разработчиком или начинающим пользователем, исправление ошибки 500 является довольно простым процессом, если вы знаете, где искать её причину. Как и в реальной жизни, для решения проблемы нужно сначала найти её источник. После этого, вы можете использовать онлайн ресурсы или это руководство для решения данной проблемы.

У вас есть чем с нами поделиться? Расскажите о ваших идеях или советах в комментариях!

Author

Елена имеет профессиональное техническое образование в области информационных технологий и опыт программирования на разных языках под разные платформы и системы. Более 10 лет посвятила сфере веб, работая с разными CMS, такими как: Drupal, Joomla, Magento и конечно же наиболее популярной в наши дни системой управления контентом – WordPress. Её статьи всегда технически выверены и точны, будь то обзор для WordPress или инструкции по настройке вашего VPS сервера.

Are you seeing 500 internal server error in WordPress?

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 internal server error in WordPress.

How to fix internal server error in WordPress

What Causes Internal Server Error in WordPress?

Internal server error is not specific to WordPress. It can happen with any website running on a web server. Due to the generic nature of this error, it does not tell the developer anything.

Asking how to fix an internal server error is like asking your doctor how to fix the pain without telling them where the pain is.

Example of a WordPress website showing internal server error

Internal server error in WordPress is often caused by plugin or theme functions. Other possible causes of internal server error in WordPress that we know of are: corrupted .htaccess file and PHP memory limit.

We have also heard internal server error only showing up when you are trying to access the 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 don’t like the video or need more instructions, then continue reading.

Checking for Corrupt .htaccess File

The first thing you should do when troubleshooting the internal server error in WordPress is check for the corrupted .htaccess file.

You can do so by renaming your main .htaccess file to something like .htaccess_old. 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 connected, the .htaccess file will be located in the same directory where you will see folders like wp-content, wp-admin, and wp-includes.

Editing .htaccess file in WordPress

Once you have renamed the .htaccess file, try visiting your site to see if this solved the problem. If it did, then give yourself a pat on the back because you fixed the internal server error.

Before you move on with other things, make sure that you go to Settings » Permalinks page in WordPress admin area and click the save button without making any changes. This will generate a new .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 internal server error can happen if you are exhausting your PHP memory limit. Use our tutorial on how to increase PHP memory limit in WordPress to fix that.

If you are seeing the internal server error only when you try to login to your WordPress admin or uploading an image in your wp-admin, then you should increase the memory limit by following these steps:

  1. Create a blank text file called php.ini
  2. Paste this code in there: memory=64MB
  3. Save the file
  4. Upload it into your /wp-admin/ folder using FTP

Several users have said that doing the above fixed the admin side problem for them.

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 Plugins

If none of the above solutions worked for you, then this error is most likely being caused by a specific plugin. It is also possible that it is a combination of plugins that are not playing nice with each other.

Sadly, there is no easy way to find this out. You have to deactivate all WordPress plugins at once.

Follow the instructions in our guide on how to deactivate all WordPress plugins without WP-Admin.

Deactivate all WordPress plugins

If disabling all plugins fixed the error, then you know it is one of the plugins that is causing the error.

Simply go to the WordPress admin area and click on ‘Plugins’. Now you need to reactivate one plugin at a time until you find the one that caused the issue. Get rid of that plugin, and report the error to the plugin author.

Re-uploading Core Files

If the plugin option didn’t fix the internal server error, then it is worth re-uploading the wp-admin and wp-includes folder 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.

Download WordPress

This will install WordPress zip file to your computer. You need to extract the zip file and 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 wp-includes and wp-admin folders and then right-click and select ‘Upload’.

Upload fresh WordPress files

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

Overwrite files

Your FTP client will now replace your older WordPress files with newer fresh copies. If your WordPress files were corrupted, then this step will fix the internal server error for you.

Ask your Hosting Provider

If all methods fail to fix 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 beginners guide on troubleshooting WordPress.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. We have been creating WordPress tutorials since 2009, and WPBeginner has become the largest free WordPress resource site in the industry.

Сообщение об ошибке сервера 500 на стороне клиента или в панели администрирования может стать источником серьезных проблем и причиной потери посетителей. Устранить внутреннюю ошибку сервера HTTP 500 особенно сложно, потому что причины возникновения подобной неполадки могут быть самыми разными.

Формат сообщения о внутренней ошибке сервера 500 не предполагает никаких пояснений о возможном источнике проблемы, и на поиск причины возникновения неполадки могут уйти часы терпеливой работы. В это время сайт теряет посетителей и возможные продажи, страдает репутация компании.

Если на вашем сайте появилось сообщение о внутренней ошибке сервера HTTP 500, понадобятся все возможные способы устранения возникшей проблемы, которые рассмотрены в этой статье. Надеюсь, это руководство поможет вернуть сайт в рабочее состояние в кратчайшие сроки.

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

Краткая справка: внутренняя ошибка сервера 500 в 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 – он покажет, если интернет-ресурс полностью недоступен всем посетителям, либо проблема находится на вашей стороне.

Содержимое лога сервера может пролить свет на причины возникновения проблемы. Журналы сервера предоставляют ценную информацию, и помогут выяснить многие причины возникновения неполадки. Среди возможных причин может оказаться установка некорректной темы оформления, плагина; ошибки при установлении соединения с базой данных.

При ошибках, связанных с базами данных, браузер обычно показывает пустую страницу, которую иногда называют «белым экраном смерти». Вследствие отсутствия соединения с базой на экране не будет никаких данных. Эта неполадка не только уничтожает клиентскую часть сайта, но и лишает администратора доступа в панель управления.

Основные причины подобной проблемы следующие:

  1. Поврежденный файл базы данных WordPress.
  2. Повреждение файлов движка WordPress злоумышленниками или вирусами.
  3. Перегрузка базы данных запросами при большом объеме трафика – такое чаще всего происходит на общих хостингах.

Для решения возникшей проблемы, прежде всего, проверьте корректность параметров конфигурации базы данных, или восстановите базу данных из резервной копии. WordPress также предоставляет встроенный метод исправления нерабочей базы данных следующей командой:

Define(‘WP_ALLOW_REPAIR’, true);

Очистите кэш браузера

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

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

Отключите тему оформления или плагин, вызывающие ошибку

Если вам не удается войти в панель администрирования WordPress для отключения некорректной темы оформления или плагина, придется действовать обходным путем. Способ прост, хотя и займет некоторое время. Понадобится FTP-клиент для прямого доступа к файлам сайт. Скачайте, например, FileZilla, введите в параметрах соединения адрес сайта, логин и пароль, подключитесь к серверу – файлы вашего сайта будут в окне справа.

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

Если окажется, что ошибку вызывают не плагины, проделайте эти же самые шаги, последовательно проверяя все темы оформления в папке themes. Удалите проблемную тему оформления и перезагрузите сайт.

Проверьте файл .htaccess

Установка новой темы оформления или плагина могут вызвать изменения в файле .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, протокол назначения прав доступа выглядит следующим образом:

  1. Все директории должны иметь права 755 или 750.
  2. Для файлов назначают права 644 или 640, кроме файла wp-config.php, который должен иметь права 400 или 440 с целью обеспечения защиты от несанкционированного доступа.
  3. Ни в коем случае не назначайте права 777 для директорий.

Если права доступа имеют какие-либо другие параметры, возможно появление ошибки 500. Параметры можно проверить с помощью FTP-клиента – они указаны в «Разрешениях». Если вы обнаружите файл или папку с правами доступа, отличающимися от регламентированных – кликните правой кнопкой и измените соответствующий параметр на правильный.

Переустановите WordPress

Системные файлы могут повреждаться со временем, в таком случае понадобится переустановка WordPress. Такие повреждения случаются редко, но если все рассмотренные выше методы не помогли, это единственный оставшийся вариант. Переустановка ничем не отличается от первоначальной установки WordPress – скачайте свежий установочный файл с www.wordpress.org и установите WordPress на свой хостинг.

Установочные файлы находятся в папке WordPress. Подключитесь к серверу с помощью FTP-клиента, найдите папки wp-admin и wp-includes, начните загрузку файлов. Когда появится запрос о действиях с существующими файлами, выберите «Переписать». Эта операция заменит все старые файлы в директориях wp-admin и wp-includes новыми. Если после перезагрузки сайта все заработает правильно – проблема была в поврежденных файлах WordPress.

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

WordPress включает в себя инструмент для тестирования и отладки. Он пригодится, если источник возникшей проблемы остается неясным. В ходе отладки в файл wp-config.php вставляют фрагменты кода, который поможет определить причины неполадок. Результаты тестов записываются в файл, расположенный в корневом каталоге. Для интерпретации и последующей настройки лучше обратиться к опытному профессионалу: новичку сложно отличить незначительную ошибку от серьезной. Кроме того, в процессе тестирования фрагменты кода могут быть видны посетителям сайта.

Внутренняя ошибка сервера 500 досадна – особенно потому, что причины ее появления часто неясны, а единственного простого решения не существует. Приведенные в этой статье методы не требуют навыков программирования, но в большинстве случаев помогут решить возникшую проблему.

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

The 500 Internal Server Error is arguably the most frustrating error you can experience with WordPress because it can literally mean just about anything. That’s not to say you can’t fix it—you can, and one of the solutions below should help you get your site back up and running.

There are a few common causes, such as having a corrupted .htaccess file, exceeding your PHP memory limit, and having improper file permissions. There are less common causes, too, including issues with your plugins or server.

Unfortunately, there’s no straightforward, 5-minute fix. Solving your 500 internal server error will require troubleshooting that will take time and patience. Typically, fixing this cryptic error will help you determine what actually caused it.

To help you, I’ve put together this troubleshooting guide. Start with the first potential fix—creating a new .htaccess file—and work through each solution before moving onto the next possible fix.

troubleshooting 500 internal server error

What is a 500 Internal Server Error?

When you visit a site, your browser sends a request to the site’s server. The server processes the request and sends back the resources to display the page, along with an HTTP header, which includes an HTTP status code.

The status code tells your browser the status of the request. For example, a 200 status code means smooth sailing—everything is OK. But if you get a 500 status code, it means something went wrong, and the server isn’t quite sure what went wrong.

Basically, the 500 internal server error code is a generic “catch-all” that means the server encountered an unexpected condition that prevented it from fulfilling the request.

There are several different types of 500 status error codes, which all mean something different, such as 501 Not Implemented, 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway Timeout.

Naming Variations for 500 Internal Server Errors

There are many variations of the 500 internal server error message, depending on the many web servers and browsers available. The website you’re visiting might also have its own custom page for these errors.

Here are several variations of what you might see:

  • 500 Internal Server Error
  • Internal Server Error
  • 500 Internal server error
  • Error 500
  • HTTP Error 500
  • HTTP Error 500 – Internal Server Error
  • Temporary Error (500)

No matter which of these (or other variations) you see, they all mean the same thing—something has gone wrong and the server doesn’t know what’s happened.

How to Fix the 500 Internal Server Error

Like I mentioned above, this error indicates that something went wrong, but what the cause is a mystery. With resolving these errors, you essentially need to work backward—find the fix first and then you’ll know what caused the error.

Generally, 500 errors happen due to an issue on the server, but they can also happen due to some kind of client-side issue. So we’ll work through a number of different solutions below that involve both.

Create a Backup First

The fixes below involve tinkering with your site under the hood, i.e. making changes to your site’s root directory. So it’s critical you run a backup.

And if you don’t already have a backup plugin or some other solution in place, it’s high time you got one!

Some of my favorite tools include BackUpWordPress, VaultPress, and BackupBuddy. If you’re interested in database backups, check out WP Migrate DB Pro or simply use WP-CLI to run quick exports.

If you’re with a web host that offers backups, that’s great. But I’d recommend having your own solution that you can quickly access in an emergency without having to go through your host.

1. Check Your .htaccess File

If your site is hosted on a server running Apache, there’s a chance your .htaccess file is corrupted. This can happen after installing plugins or making other changes to your site.

It’s an easy fix. All you need to do is replace your corrupted .htaccess file with a new one.

Usually, all you need to do to create a new .htaccess file is to re-save your permalinks settings in the WordPress dashboard. But if your site is down, it’s likely you can’t log in to your site, ruling out this option.

So you’ll need to use FTP or cPanel to access your site’s files and locate your .htaccess file. For a step-by-step walkthrough on how to do this with FTP and cPanel, check out What is .htaccess and How to Use it With WordPress.

Before you go replacing your old .htaccess file with a new one, create a backup of your name. To do this, simply rename your existing file something like .htaccess-old. WordPress will then stop recognizing this file.

Refresh your site and if it loads properly, you know your .htaccess file has caused the 500 error. Now, revert your .htaccess file to its proper name—the issue will return, but now we’re going to fix it.

For WP Rocket users, you’ll need to be especially careful of what you do next with your .htaccess file because it contains performance optimization rules that you shouldn’t mess around with. So check out Resolve 500 Internal Server Error for what to do next.

If you’re not a WP Rocket user (what’s going on!?), create a new .htaccess file that includes the following, and then upload it to your site’s root directory:

create a new htaccess file

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

2. Increase PHP Memory limit

The cause of your 500 error could be that you’re hitting your PHP memory limit. This often happens due to poorly-coded plugins, when a site is using a lot of plugins, or when a site is using resource-intensive plugins.

All you need to do to fix this issue is increase the PHP memory limit for your site. There are a few different ways you can do this that involve updating your .htaccess file, php.ini file, or wp-config.php file.

For each of the three memory fixes below, don’t forget to refresh your site to check if it’s working so you know what’s causing your 500 internal server error.

1. Increase PHP Memory Limit in .htaccess File

Find your .htaccess file in the root directory of your site and add the following line:

php_value memory_limit 256M

This will increase your memory limit to 256 MB. If you can’t find your .htaccess, make sure you’re able to view hidden files. And if you don’t have an .htaccess file, create a new one and paste in the line above.

2. Increase PHP Memory Limit in php.ini File

You’ll find your php.ini file in the wp-admin folder in your root directory. Open it up and look for the line that starts with “memory_limit.” If it shows 64 MB or lower, replace it with this line:

memory_limit = 256M

If you can’t find your php.ini file (make sure you’ve got “show hidden files” enabled), then you’ll need to create a new file, paste in the line above, name it php.ini and save it to your wp-admin folder.

3. Increase PHP Memory Limit in wp-config.php File

If updating your .htaccess and php.ini files didn’t work, you can try increasing the memory limit in your wp-config.php file.

Add the following line to your wp-config.php file just before the “happy blogging” line:

define('WP_MEMORY_LIMIT', '256M');

Save the file and refresh your site. If it still isn’t working and you have a sneaking suspicion your plugins could be pushing your PHP memory limits, get in touch with your web host about increasing your memory on the server side.

3. Audit Your Plugins

Plugins can also cause 500 internal server errors. This includes outdated plugins causing compatibility issues and even new plugins that have been coded poorly. You might even find that you get the 500 error immediately after installing a new plugin.

To find out which, if any, of your plugins is causing your error, you’ll need to bulk deactivate your plugins and reactivate them one at a time.

deactivate wordpress plugins

If you’re unable to access your WordPress dashboard, FTP into your server and open your wp-content folder, find your plugins folder and rename it something like plugins-old—this will effectively deactivate all of your plugins.

rename plugin folder from the FTP

Then refresh your site. If it starts working, the cause of your 500 error is one of your plugins.

The next step is identifying which plugin is the culprit. To do this, rename your plugins folder back to “plugins” and then go into the folder and rename each individual plugin folder, one-by-one until you’re able to refresh your site and it works again.

When you find the offending plugin, get in touch with the plugin developer for help.

4. Check File Permissions

If none of the above has worked, you could have an issue with file permissions. Files in your WordPress directory should be set to 755 or 644 and when they’re mistakenly or accidentally set to anything else it can set off a 500 error.

To check your file permissions, FTP into your server and check your site’s directory. Here, I’m using Filezilla to access my test site and as you can see my permissions are set to 755 for folders and 644 for everything else.

checking file permission from the FTP

The WordPress Codex recommends the following file permissions:

  • All directories should be 755 or 750.
  • All files should be 644 or 640. (The exception being wp-config.php, which you can set to 440 or 400 to prevent other users on the server from reading it.)
  • Directories should never be set to 777.

If you find that a certain file has the wrong permission, just right-click it in your FTP program to access file permissions and update it to the appropriate number.

update file permissions from the FTP

Check out How to make system files (.htaccess, wp-config.php) writeable to learn more about updating file permissions.

5. Reinstall WordPress Core Files

It’s not unusual for WordPress core files to become corrupted, especially on older sites that have been customized and updated many times.

To fix this issues, you’ll need to replace your core WordPress files with fresh ones. There’s no need to re-install WordPress—simply download the latest version of WordPress and unzip the file. FTP into your site’s root directory and upload the wp-admin and wp-includes folders from the zip file you just downloaded, overwriting the older versions.

replacing wordpress core files ftp

Doing it this way, you won’t overwrite your plugins and themes.

Refresh your site. If the 500 error has disappeared, you’ve pinpointed the cause—corrupted core files.

6. Contact Your Web Host

If you’re still getting the 500 internal server error after working through each of the fixes above, it’s time to contact your web host. Your host’s server logs might be able to shed some light on what’s causing the error so it can be resolved.

Rather than skip the above and go straight to your host for help, it’s a good idea to investigate the cause of your error first. This way, you can provide your host with a rundown of what you’ve tried, so your error isn’t simply dismissed as an issue with your site’s files.

This is particularly true if you’re on cheaper shared hosting. If you’re on managed WordPress hosting, it’s usually the case that your host will help you pinpoint and fix you 500 internal server error.

Wrapping Up

This is by no means an exhaustive list of 500 internal server error fixes. What’s causing your particular issue could be just about anything. But this list will give you a head start on fixing and finding the cause (in that order!).

Lastly, don’t forget to back up your site before updating files in your root directory. If you make a change that impacts your site, you’ll be able to quickly revert to a previous backup.

Have you experienced a 500 internal server error? How did you fix it? Let us know in the comments below!

In WordPress, the Internal Server Error or Error 500 is one of the most annoying errors because it does not return actual data about the underlying issue. It’s hard for beginners to eliminate it. There are many different reasons for Internal Server Errors.

Download WP STAGING to avoid this and other errors in the future. The WP STAGING plugin allows you to create a copy of your WordPress site in seconds. You can test new plugins, designs, and other updates in a secure environment on that staging site.

This error is a very dreaded kind of error. It seems to always come out at a very inopportune time. An error 500 means your site is offline completely and will not be available anymore, meaning you will start losing your customers. If your site is down for more than a few hours, Google might think there is something wrong with your site. This can lead to a loss of your site’s search engine rankings.

Contents

  • 1 What is the Internal Server Error in WordPress?
  • 2 Reason Behind the occurrence of Internal Server Error in WordPress
  • 3 How to fix Internal Server Error in WordPress
    • 3.1 Reload the Page
    • 3.2 Delete the Browser Cache
      • 3.2.1 Clear Cache In Google Chrome
      • 3.2.2 Clear the Cache in Firefox
      • 3.2.3 Clear the Cache in Apple Safari
      • 3.2.4 Clear the Cache in Microsoft Edge (Internet Explorer)
    • 3.3 Check Server Log Files
    • 3.4 Check .htaccess File
    • 3.5 Increase the Server Memory limit.
    • 3.6 Check Installed Plugins and Themes
    • 3.7 Repair WordPress Core Files
    • 3.8 Contact Your Hosting Provider

In this article, we will try to resolve this error in simple steps. But first, we need to know what the Internal Server Error is to fix it properly.

The proper definition of Internal Server Error is unclear or undefined. An Internal Server Error or Error 500 is generic. It occurs when you visit a website, and your program sends a request over to the server where the site is hosted. The server receives the request, measures it, and sends back the resources (CSS, HTML, PHP, etc.) along with a header. If the status code is 200, then it means “Everything is Ok,” but if the status code is 500 (that’s why the name Error 500), there is an error. That error is caused because some code that went wrong on the website end.

The error may look like this:

Or it may look like this.

There are many different types of internal server errors with other status codes (500, 501, 501, 502, 503, etc.), but all these status codes are different but similar, so your site ends up not working as expected.

Reason Behind the occurrence of Internal Server Error in WordPress

There are many reasons for this error. In WordPress, mostly, it occurs because of the following issues:

  • Outdated or broken Browser Cache
  • Low Memory Limit
  • Broken code in Plugins and Themes Functions
  • Corrupted files in WordPress core folders
  • Corrupted .htaccess file

How to fix Internal Server Error in WordPress

We have several steps to resolve this problem:

Reload the Page

When an Internal Server Error is displayed when you are opening a website, the easiest and first thing you should do is reload the page by pressing F5. If that is not successful, press ctrl + F5.

It may be the case that the server is essentially overloaded, and the site will return properly when you refresh it several times.

Delete the Browser Cache

Another good idea is to clear the browser cache. Clearing the browser cache may solve your problem. How to clear the cache on different browsers are given below:

  • Clear Cache In Google Chrome

To clear the Chrome cache, follow the following steps:

  • From the top of the Chrome window, click on the right side.
  • Then, select more tools and, from there, enter Clear browsing data.
  • From the Time range, select All Time.
  • Then, checkmark Cookies and other site data & Cached Images and Files.
  • Then, click the Clear Data button.

These steps can be performed on any chromium-based browser, i.e., Microsoft Edge, to clear the cache.

  • Clear the Cache in Firefox

Follow the following steps to clear the Firefox browser cache:

  • Firstly, open the menu bar and then select Options from the menu.
  • Select Privacy & Security from General
  • Then from the Cookies & Site Data section, click Clear Data.
  • From the dialogue box, remove the Cookies and Site Data checkmark.
  • Clear the data with Cached Web Content checkmark

  • Clear the Cache in Apple Safari

To clear the Safari browser cache, follow the following steps:

  • Select Setting from the home screen of Safari
  • Select Clear cookies & Data from the bottom of Safari’s Setting screen
  • Clear the cache from it
  • Clear the Cache in Microsoft Edge (Internet Explorer)

To clear the Internet Explorer cache, follow the following steps:

  • Firstly, Close all the windows of Internal Explorer.
  • Open a new one and then click on Tools Box.
  • Select Internet Options from the bottom
  • From the browsing history, click the Delete button.
  • Then, from Delete Browsing History, check-marked the temporary Internet files and website files and Cookies and Website Data and click on the Delete button and then Ok.

The following steps are more complex and affect the database/files on the WordPress website. To not cause any further damage, and if you still have access to the WordPress dashboard, create a staging site with WP STAGING and try to fix the error on the staging page instead of the production site.

You can create a staging site with WP STAGING.

Check Server Log Files

When your website throws a fatal error 500, you can tell your website to write more explicit error messages into a so-called log file for debugging purposes.

You can  enable the debug mode in your WordPress by opening the file wp-config.php and adding the following lines of code into it:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

You can find the wp-config.php file in the root folder of your WordPress installation. You can use your web hosting control file manager or FTP to edit this file.

Check out that article to learn in detail how to activate the WordPress debug.log.

If this works, you will see all the relevant errors in the file debug.log. That will help you to find out what plugin or code causes the error.

You can find the logfile at the location /wp-content/debug.log in your website’s file system.

  • Please open the file and check it.

If you see some error messages related to one of your installed plugins, you can disable the plugin by renaming its folder to something like
/wp-content/plugins/plugin-name-temp/

If no results are provided in the debug.log, there is still access to the server error.log file.

Depending upon what kind of web server your hosting provider uses, you can find the server error log file in the paths:

Apache server: /var/log/apache2/error.log

or

Nginx server: /var/log/nginx/error.log

To access these files, you will need to have full access to your hosting. You can use an FTP client and troubleshoot with the help of these files. Some web hosting control panels also have more easy access to these files.

Check .htaccess File

The 500 Internal Server Error may also happen due to some faulty code in the .htaccess file. That file is located in your WordPress site’s root directory and is essential to make your website running properly.

To troubleshoot your .htaccess, we need to disable the current one and create a new one.

First of all, use FTP or the file manager app in your hosting account to connect to your site.

You can find the .htaccess file beside the folders wp-admin, wp-includes, and wp-content.

  • Rename the file to .htaccess_backup have a backup of the file if something goes wrong.
  • Please create a new file and name it.htaccess
  • Add the following lines of code into 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

If the old .htaccess file were the reason for the error 500, this would fix the Internal Server Error for you.

Increase the Server Memory limit.

Sometimes the error 500 occurs because of the low Memory Limit of PHP in WordPress. To resolve this error, you may have to increase the memory limit. If your host provides cPanel, you can increase your PHP memory limit from the dashboard user interface.

The steps are the following:

After opening the cPanel, click on the link that says, “Select PHP version.”

Then, click on “Switch to PHP Options.”

Then, click on “memory_limit” at the bottom and change its value to something higher, usually in the range of multiplied by 2, i.e., 256, 512 and save it.

Another way is to add the line below into your wp-config.php. You can use your hosting file manager software or an FTP client to edit that file.

Just add the following line on top of your wp-config.php file.

define('WP_MEMORY_LIMIT', '256M');

If a lack of memory was your issue, then this step will fix the Internal Server Error for you.

Check Installed Plugins and Themes

Sometimes, an Internal Server Error occurs due to recently installed WordPress themes or plugins. If you recently installed a plugin or theme and it broke your site, there is a chance that you can deactivate that plugin to fix the error.

You can use the step below only if your WordPress admin dashboard under /wp-admin is still available!

  • Select all plugins, click on “Bulk-Actions,” and on “deactivate” to deactivate all plugins.

  • Activate the Plugins one by one again and reload your site after each plugin activation.
  • If you see the error again, deactivate or remove that plugin, which causes the problem.

If your WordPress admin dashboard is not available, you can disable a specific plugin by renaming its plugins folder to something else manually.

To do this, connect to your site via FTP.

For instance, if the woocommerce plugin is responsible for error 500 Internal Server Error, you’ll need to rename the folder from
/wp-content/plugins/woocommerce to
/wp-content/plugins/woocommerce-disabled.

After that step, the woocommerce plugin will be disabled, and you can reaccess your website.

If you want to disable all plugins, rename the folder wp-content/plugins and reload your site.

Then all plugins will be disabled, and your site should be reachable again.

After that step, rename the folder wp-content/plugins-tmp back to the original name wp-content/plugins.

Repair WordPress Core Files

Sometimes, especially in older sites, WordPress files can be corrupt. If the WordPress core system is corrupt, you need to repair the core files by replacing them with the original ones.

One way is to go to wordpress.org and download the latest copy of WordPress from there.

  • Once downloading, unzip it.
  • After that, connect to your host using your FTP client or using the file manager within your hosting account.
  • Replace the entire folders /wp-admin and /wp-includes within your WordPress installation with the ones from the extracted zip file.
  • To do that, rename the current folders wp-admin and wp-includes to wp-admin-backup and wp-includes-backup.  This can be done with the hosting file manager or the FTP client.

  • Upload the new directories from the unzipped file to the same location as the old directories.

If your WordPress files were corrupted, this step would fix the 500 Internal Server Error for you.

Contact Your Hosting Provider

There are a few uncommon issues with Internal Server Errors in WordPress. At this point, you have to contact your host. Sometimes, these issues can be resolved by the hosting provider by looking at the file permissions and other settings.

If this still does not solve your issue, You may have to switch to another more optimized host to run your WordPress site.

  • 1.
    Из-за чего возникает ошибка Internal Server Error в WordPress?

  • 2.
    Проверка файла .htaccess на наличие ошибок

  • 3.
    Увеличение лимита PHP памяти

  • 4.
    Деактивируйте все плагины

  • 5.
    Повторная загрузка файлов WordPress

  • 6.
    Помощь вашего хостинг провайдера

Как исправить ошибку 500 “Internal Server Error” в WordPress? Internal Server Error (внутренняя ошибка сервера) – одна из распространенных ошибок WordPress. Так как ошибка не дает никакой дополнительной информации, новички часто впадают в ступор, как же с ней бороться. В этой статье мы расскажем и покажем, как легко исправить ошибку 500 Internal Server Error в WordPress.

Internal Server Error не относится именно к WordPress. Ошибка может возникнуть на любом сайте, работающем на хостинге. Из-за различных причин её возникновения, она ничего не говорит разработчику.

Ошибка 500 Internal Server Error в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Спрашивать, как исправить Internal Server Error, это тоже самое, что спросить у врача, как избавиться от боли, не говоря, где и что болит.

Internal Server Error в WordPress часто появляется из-за не правильности кода плагинов и тем. Также возможны другие причины Internal Server Error, например поврежденный файл .htaccess или ограничение памяти PHP.

Также бывают случаи, когда 500 ошибка возникает при входе в админ панель, хотя публичная часть сайта работает нормально.

Давайте посмотрим, как исправить ошибку Internal Server Error в WordPress.

Проверка файла .htaccess на наличие ошибок

Первое, что вы должны сделать при устранении ошибки Internal Server Error – проверить файл .htaccess.

Сделать вы это можете переименовав основной файл .htaccess в что-то вроде .htaccess_old. Чтобы это сделать, вам нужно войти на свой сайт используя FTP-клиент или “Диспетчер файлов” в панели управления хостингом.

Файл .htaccess находится в корне сайта, там же, где находятся папки wp-content, wp-admin и wp-include.

После того, как вы переименовали файл .htaccess, попробуйте зайти на ваш сайт и проверить, пропала ли ошибка. Если это так, то поздравляем, вы исправили ошибку Internal Server Error.

На этом мы ещё не закончили. Перейдите в админ-панель сайта в раздел Настройки -> Постоянные ссылки и нажмите кнопку “Сохранить“, не внося никаких изменений. Это позволит создать новый файл .htaccess для вашего сайта. Это даст гарантию, что все ссылки будут открываться корректно и не возникнет 404 ошибок.

Если этот способ не помог, то давайте продолжим.

Увеличение лимита PHP памяти

Иногда внутренняя ошибка сервера может произойти, если вы исчерпаете лимит PHP памяти (PHP Memory Limit).

Чтобы увеличить лимит PHP памяти, просто добавьте в файл wp-config.php следующую строку:

Если вы видите ошибку 500 только тогда, когда вы пытаетесь войти в админ панель или загружаете изображение в медиатеку, то вы увеличить лимит памяти можно выполнив следующие действия:

  1. Создайте пустой текстовый файл с именем php.ini в корне вашего сайта
  2. Вставьте в файл этот код:
    memory = 64MB
  3. Сохранить файл

Некоторые пользователи сообщают, что выполнение этого действия исправило проблему в панели администратора.

Если после увеличения лимита PHP памяти ошибка Internal Server Error пропала, то это не значит, что проблема решена полностью. Вам нужно определить, почему исчерпался предел памяти.

В этом может быть виноват плохо написанный плагин или функция в теме. Мы рекомендуем обратиться в поддержку вашего хостинга, чтобы они проверили логи сервера. Это поможет понять, что использует большое количество памяти.

Если увеличение лимита PHP памяти не устранило проблему, вам нужно ещё кое-что сделать.

Деактивируйте все плагины

Если ни одно из перечисленных выше решений не помогло вам победить ошибку Internal Server Error, то проблема определенно вызвана каким-то плагином. Также возможно, что есть конфликтующие плагины, которые вызывают ошибку из-за несовместимости друг с другом.

Единственный способ понять, какой плагин вызывает ошибку – отключить все плагины одновременно.

Чтобы это сделать, нам потребуется подключиться к сайту с помощью FTP-клиента или “Диспетчера файлов” на вашем хостинге.

Зайдите в корень вашего сайта, далее в папку wp-content. Там вы увидите папку plugins. Вам нужно переименовать эту папку, например в plugin-deactivate.

С помощью этого незамысловатого действия, вы сможете отключить все плагины на вашем сайте.

Далее попытайтесь зайти на сайт в админ панель. Если ошибка пропала, то поздравляем – мы нашли причину ошибки.

Теперь следует переименовать папку с плагинами обратно в plugin. После этого зайдите в админку сайта в раздел Плагины -> Установленные. Вы заметите, что все плагины деактивированы и всё что вам нужно делать, это включать плагины по одному и каждый раз проверять работоспособность сайта. Этот процесс довольно долгий, но позволяет точно определить проблемное место.

После нахождения проблемного плагина – удалите его и сообщите о ошибке разработчику плагина.

Данный способ вы можете проделать также с активной темой, переименовав папку темы. Желательно, чтобы на сайте была установлена одна из стандартных тем WordPress.

Повторная загрузка файлов WordPress

Если отключая все плагины у вас не удалось избавиться от ошибки Internal Server Error, то стоит заново загрузить папки wp-admin и wp-include из официальной сборки на ваш хостинг.

Ошибка 500 Internal Server Error в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Вы можете воспользоваться нашей полной инструкцией, как обновить WordPress. Это поможет вам обновить ядро WordPress до актуальной версии и исправить возможные ошибки.

Если вы не хотите обновлять WordPress, то вам потребуется скачать ту версию WordPress с официального сайта, которая установлена на вашем сайте. Это позволит избежать конфликтов между файлами.

Помощь вашего хостинг провайдера

Если все изложенные методы не помогли исправить ошибку 500 Internal Server Error на вашем WordPress сайте, то пришло время получить дополнительную помощь. Обратитесь в службу поддержки вашего хостинга. Они смогут проверить журнал сервера и определить причину ошибки.


Мы надеемся, что эта статья помогла вам справить Internal Server Error в WordPress. В комментариях пишите, какой способ помог лично вам, какие способы борьбы с этой ошибкой вы знаете.

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

As marketers, we love high numbers. 500 post views? 500 new leads today? Fantastic!

woman using a laptop computer to resolve the

But, sometimes high numbers aren’t so great. The last thing any website owner wants to see when opening their homepage is this:

an example. ofan error screen displaying the HTTP Error 500 message in wordpress, is currently unable to handle this request

When you get a 500 Internal Server Error on your WordPress website, it brings your entire operation to a standstill and leaves you rushing to find a solution.

The good news is that this is a common problem in WordPress. And, with a bit of investigation, there’s usually an easy solution. In this article, I’ll show you why your site «is currently unable to handle this request» and how to get rid of this message.

Download Now: How to Launch a WordPress Website  [Free Guide + Checklist]

When you visit a website, your browser makes a request to a web host, asking to send you a web page. If something is wrong with your website that prevents the hosting server from delivering that page to your browser (i.e. it is unable to handle the request), it will instead send you an error message. This is a 500 Internal Server Error.

An HTTP 500 error can be caused by many different things, but it’s probably not an issue with the host server itself. It’s more likely that the host can’t retrieve the contents of your WordPress site for some reason.

With the WordPress CMS, the most common causes of a 500 Internal Server Error are:

  • faulty plugins or themes
  • a broken .htaccess file, and/or
  • the PHP memory limit being exceeded.

Occasionally, the issue might also come from your hosting server.

The vagueness of a 500 makes it pesky to deal with — the good news is that trying a few repairs will almost certainly solve your problem. Here’s what to do:

How to Fix the 500 Internal Server Error in WordPress

  1. Back up your website.
  2. Enable the WordPress debugging feature.
  3. Deactivate your plugins.
  4. Disable your currently active theme.
  5. Check your .htaccess file.
  6. Check your PHP memory limit.
  7. Replace your WordPress core files.

1. Back up your website.

Fixing your issue will require changing some things on your site, including some alterations to with your plugins, themes, and possibly your WordPress core files. Even though your site is down, make a backup of your files in case you lose data and need to backtrack.

Save your backup in a safe location. Hopefully you won’t need it, but it’s good to have just in case.

2. Enable the WordPress debugging feature.

WordPress includes a handy debugger to help you troubleshoot issues like this. When something goes wrong, the error log will report the specifics of the problem.

The debugger disabled by default — first enable it with the steps below:

1. Access your website via FTP.

2. Open your public_html folder, or whichever directory contains your WordPress files.

3. Locate and right-click the wp-config.php file, then choose View/Edit.

4. With the file open, scroll to the bottom of the file and paste the following line of code:

 

define( 'WP_DEBUG', true );

This code tells WordPress to log errors on your website.

5. Save your changes and reload your website. On the error screen, you might see a more detailed report that identifies the source of the issue — this could point to a specific plugin or file. If the source of the problem is still unclear, read on.

Once you’re finished using the debugger, remember to disable it by removing the code you added above and saving the file, being careful not to change anything else!

3. Deactivate your plugins.

A likely cause of this error is that one of your plugins (or a combination of plugins) is causing your backend to malfunction. The best way to test this is by deactivating all your plugins, then narrowing down to the culprit(s).

If you can access the administrator account, try the following:

1. From the dashboard, select Plugins > Installed Plugins.

2. Check the box next to Plugin to select all your plugins.

3. Choose Deactivate from the Bulk Actions drop-down menu, then click Apply.

4. Refresh your site. If you no longer see the error, start activating each plugin one by one and reloading your website after each activation to identify the faulty plugin.

If you don’t have access to the administrator controls, you will need to connect to your server using the file transfer protocol (FTP). After connecting, you’ll see all your files for your WordPress website. Follow these steps:

1. Open the public_html folder (or wherever your WordPress files are stored on your server), then open the wp-content folder.

2. Rename your plugins folder “plugins_old”.

3. Refresh your website. If your site works, rename your plugins_old folder back to “plugins”.

4. Within the plugins folder, rename each plugin folder one at a time until you find the plugin that causes the bug.

If you find a specific plugin causing the error, replace the plugin or notify the plugin developer.

4. Disable your currently active theme.

If plugins aren’t the issue, your WordPress theme might be, especially if it comes from a third-party developer. To check this, start by temporarily replacing your current theme with a default WordPress theme. If you can access the administrator controls, follow these steps:

1. Select Appearance > Themes from the WordPress dashboard.

2. Activate any default WordPress theme, such as Twenty Nineteen.

activate theme screen to resolve the ""is currently unable to handle this request". HTTP 500 error" in WordPress

3. Check your website for the HTTP 500 error message.

If you can’t get into the admin account, you’ll need to use an FTP client to access the website. Then, do the following:

1. Open the public_html folder (or wherever your WordPress files are stored), then open the wp-content folder.

2. Open the themes folder and look for your active theme folder.

3. Add “_old” to the end of the name of your active theme folder. This disables the theme.

4. Refresh your website. If it works, you’ve found the problem. Contact the theme developer about the error and ask for the latest version of the theme.

5. Check your .htaccess file.

The next likely cause of a 500 Internal Server Error in WordPress is a corrupted .htaccess file, located in the root directory of your website files (usually public_html). This file contains various directions for your host server to follow, like allowing password-protection for web pages and redirecting URLs.

Like other source files, any typo or incorrect modification in .htaccess will break the code and potentially your site. Follow these steps to make sure it’s working:

1. Connect to your server with FTP or your cPanel dashboard.

2. Open your public_html folder (or whichever folder is your site’s root directory).

3. Find the .htaccess file. Your server might hide this file by default, in which case change the view settings to reveal it. Rename the .htaccess file to something like .htaccess_test.

4. Refresh your website. If you no longer see the HTTP 500 error, this means .htaccess is the source of the error. If you still see a 500, .htaccess is not the issue and you can skip to the next step, checking your PHP memory limit.

5. To repair .htaccess, you just need to replace it with a new one. From your WordPress dashboard, select Settings > Permalinks.

6. Click the Save Changes button at the bottom of the page. This replaces the old .htaccess file.

6. Check your PHP memory limit.

Your site’s PHP memory limit is allotted by your WordPress installation and by your host. If your site exceeds its memory capacity, this throws a 500 Internal Server Error. To increase your memory limit, try these steps:

1. Access your server files with FTP or cPanel.

2. Navigate to your site’s root directory and find the file wp-config.php. This file contains the rule that determines your memory limit. Make a copy of this file as a backup.

3. Open wp-config.php and search for the code “WP_MEMORY_LIMIT.” If you find it in the file, replace the value in this rule with ’64M’. If not, paste this line of code at the bottom of the file:

 

define('WP_MEMORY_LIMIT', '64M')

4. Refresh your website. If the error is gone, you’ve found the issue.

This is just a temporary fix — if you’ve exceeded your memory limit, you need to determine why. It’s possible your site has grown too large, in which case you should upgrade your hosting plan to accommodate your storage needs.

However, another potential cause is a plugin or theme that is depleting your memory. To check this, contact your hosting provider and request a report of resource usage, or find this information yourself if your host has it accessible to you.

7. Replace your WordPress core files.

In some instances, your WordPress core files may have been improperly modified by a plugin or theme. If you’ve gotten this far with no fix, it might be worth it to swap out your current core files with clean, unmodified ones. While you’ll still have your site data after this change, you might need to re-toggle some original settings.

To replace WordPress core:

1. Download WordPress and unzip it on your device.

2. In the main wordpress folder, delete wp-config-sample.php and the wp-content folder. If you don’t delete these files, they’ll overwrite your current site data.

3. Use your FTP client to place the new WordPress core files on your hosting server and replace the current files.

If your more of a visual learner, here’s a video that outlines all of these steps.

If All Else Fails…

As a last resort, reach out to your hosting provider support — the problem may actually be on your server in this case. Explain the troubleshooting you’ve conducted, and they’ll review your server configuration and logs to track down the cause. It’s in situations like this where quality customer service from your hosting provider really shines through.

Internal server errors are so frustrating because they’re ambiguous and sometimes even misleading. Still, by following the steps above, you’ll hopefully come out of it with minimal impact to your WordPress website and your reputation.

One more note: Be cautious about these types of errors when changing your website. We highly recommend testing out your new themes, plugins, and updates in a staging site. This way, if you get a 500, your visitors won’t see it on your live site and you won’t be scrambling for a fix.

wp

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Workers resources soviet republic как изменить язык
  • Wordpress php error log
  • Workers resources soviet republic как изменить разрешение экрана на пиратке
  • Wordpress fatal error uncaught error call to undefined function
  • Worker rebooting by driver error raveos

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии