Ошибка 500 при установке вордпресс

Мар 15, 2023

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 хостинг со скидкой до 81%!

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

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

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

  • Доступ к панели управления вашим хостингом
  • Доступ к панели управления 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 — Начать всё заново

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

Заключение

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

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

Author

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

Are you frustrated trying to fix the HTTP 500 Internal Server Error on your WordPress site? 

You’re not alone. This is one of the most dreaded errors on WordPress because it never has a straightforward solution. 

Troubleshooting can take a lot of time and meanwhile, your site is down. You lose visitors, traffic, SEO rankings, and revenue.

But don’t worry. We’ve encountered this error on our site too. Plus, we’ve seen many of our clients go through the same ordeal. 

In this guide, we show you the steps you can take to successfully solve the HTTP 500 error fast.

TL;DR –

The HTTP 500 error has various causes and solutions. If you’re facing this issue and need to fix it immediately, skip ahead to How To Solve the HTTP 500 Internal Server Error. We recommend coming back later to understand this error so that you can be better prepared the next time it happens.

What Is The WordPress HTTP 500 Server Error?

The HTTP 500 Server Error, commonly known as Internal Server Error, can happen to any website that’s running on a web server, not just WordPress sites. The HTTP 500 Server Errors can occur repeatedly. Fixing it one time doesn’t mean you won’t face it again. So it’s advisable to understand what it is and why it happens.

To understand this error, you need to know how HTTP requests work. When you visit a website, your browser (such as Google Chrome or Mozilla Firefox) sends a request to the website’s server. 

The server processes this request, fetches the necessary information, and sends it back to the browser. The browser then displays the content of the website to you. 

Now, when the server sends back the data to the browser, it includes an HTTP header with a status code. This code tells you what is the status of your request. 

  • HTTP 200 means the request is all right. 
  • HTTP 500 means there is an error as something has gone wrong. 
HTTP Error 502 .png

There are various kinds of 500 errors and they each have different causes. We discuss the possible causes next. 

Why Are You Seeing The WordPress HTTP 500 Server Error?

To run your website, there are a number of devices working and communicating with each other such as servers, operating systems, and browsers. So, unfortunately, there are a number of causes and it’s difficult to pinpoint exactly where things have gone wrong. 

We’ve analyzed over 240,000 WordPress sites, and these are the predominant reasons we’ve found to be the root cause of the error:

  1. Corrupt .htaccess file
  2. Exhausted PHP Memory limit
  3. Corrupted or Incompatible plugin
  4. Corrupted or Incompatible theme
  5. Incompatible PHP version
  6. Corrupted WordPress core files
  7. Incorrect file permissions 

We’ll discuss these causes along with their solution in detail next. We understand that since the probable causes and solutions are aplenty, this guide may seem overwhelming. So we’ve detailed the easiest solutions first and if that doesn’t work, you can move on to the more technical ones. 

Steps To Take Before You Fix The WordPress HTTP 500 Server Error

Troubleshooting the HTTP 500 Error can take time. Meanwhile, your visitors will see an error or a blank website. We show you the best way to deal with an HTTP 500 Error by getting your site back online and then troubleshooting:

Step 1: Check If Your Website Is Actually Down 

Step 2: Refresh The Page 

Step 3: Clear Your Cache

Step 4: Restore Your Backup 

Step 5: Create A Staging Site

Step 1: Check If Your Website Is Actually Down 

Sometimes, it’s possible that you are seeing the HTTP 500 Error on your browser but the site probably looks fine for everyone else. There’s a handy site to check if the error is showing only for you – downforeveryoneorjustme.com. 

Down For Everyone or Just Me

Enter your website’s name or the URL you want to check. It will check the HTTP status code that is returned from the server. 

Step 2: Refresh The Page 

This may seem too basic, but in many cases refreshing the page actually works. You can refresh your browser using F5 or CTRL+F5.

The reason you may have been experiencing the error is because sometimes your web host’s server may have been temporarily overloaded. It may resolve on its own and will display a working website when you refresh your page.

Step 3: Clear Your Cache

Before you troubleshoot, it’s best to clear your cache. A cache stores your website’s data in order to reduce the loading time. 

You can clear your browser cache using the Settings option on your browser. For Google Chrome, you’ll find it under Settings > Browsing History > Clear Browsing Data.

Clear browsing data

To clear your website’s server cache, you can use any one of the Caching Plugins available in the repository. 

Clearing your cache ensures you are viewing the latest data. So when you troubleshoot the issue, you won’t be seeing redundant data. 

Step 4: Restore your backup 

If you’ve backed up your website using a plugin or your web host, the first step we recommend is to restore your backup. From our experience, restoring a backup works around 90% of the time. 

You can get your site back online so that visitors see a working website. Once that’s done, you can take your time in troubleshooting the error.

If you don’t have a backup, we strongly suggest you take one now. You can use our BlogVault plugin to take an automated backup in under a few minutes. The plugin will also come in handy in the next step.

Step 5: Create a staging site

A staging site is a clone of your live website that you can use to run tests and experiment with changes such as a new theme or plugin, switch theme etc;. 

Anything you do on this site doesn’t affect your live site so it’s an ideal solution to troubleshoot safely without worrying about causing further damage to your site. We recommend using a staging site to find the root cause of the problem especially if you’re seeing the HTTP 500 Error repeatedly on your site.

You can create a staging site easily using our BlogVault plugin. Simply activate the plugin on your site and it will automatically take a backup for you. Once complete, from the BlogVault dashboard, you can create a staging site in one click.

blogvault add staging

Alternatively, you can check with your web host if they provide staging or you can use one of the many staging plugins available. 

Once your staging site is set up, you can begin to troubleshoot the error. Let’s begin.

How To Fix The WordPress HTTP 500 Server Error

To fix the Internal Server Error on your WordPress site, there are a couple of easy steps and some highly-technical ones. 

Note: If the error occurred following an action you took like an update, then you can trace the root of the problem to the update. However, if the error is occurring randomly, then you need to follow the steps below to figure out what’s happening and how to fix it.

We’ll start with the easiest steps you can try first, if that doesn’t work, you can progress down the list. In case you’ve already tried a bunch of these steps, you can pick the steps you want to try:

1. Check Your Activity Log

2. Check If There Are Updates Available 

3. Switch To A Default Theme 

4. Check Your Plugins

5. Check Your .htaccess File

6. Check File Permissions

7. Check PHP Version 

8. Increase Your PHP Memory Limit

9. Reinstall WordPress 

1. Check Your Activity Log

If you have an audit or activity log on your site, this is your first point of troubleshooting. An activity log keeps a record of all activity on your site. 

This log will help you identify what changes were made recently. If you don’t have an audit log on your site, you can check with your web host if they can provide you with a server log.

Activity log viewer

You can quickly narrow down the root cause of the HTTP 500 error.

2. Check If There Are Updates Available 

Many times the HTTP 500 Error is caused by incompatibility issues or outdated software.  Say you updated the core to a new version. This may have caused a plugin to become incompatible to the core which caused the errors.

If you see updates available on your site, run the update. We strongly recommend testing the update on the staging site you created. 

Update Now on dashboard

If the updates resolve the problem, you can update your live site.

3. Switch To A Default Theme 

Many times, an error in a theme or child theme may be causing the HTTP 500 Error. Try deactivating your theme and activating one of WordPress’ default themes like the Twenty-Twenty theme. 

Activate default theme

If this resolves your issue, you know that the theme you’re using is causing the issue. You will need to contact the theme’s developer to find out the exact problem. They will most likely fix the bug and your theme will work fine once you update it.

4. Check Your Plugins

Plugins are one of the most common causes of the HTTP 500 Internal Server Error. A recently installed plugin may be causing the error. 

If you have access to wp-admin, go to Plugins, select all the plugins, and then Deactivate them. 

Deactivate plugins on wp dashboard

If you don’t have access to wp-admin, you’ll need to disable plugins manually. 

  • Go to your web host account and access cPanel > File Manager. 
  • Open the public_html folder and go to wp-contents. 
  • Find the folder called Plugins and rename it to Plugins_Disable.

Once you disable your plugins, clear your cache and refresh your website page. If the HTTP 500 error is gone, you can be sure it’s a plugin that’s causing the issue. 

Now you can activate plugin one or two at a time and keep reloading your site to check which plugin is causing the problem. 

If you manually disabled your plugins, you would need to rename the folder back to Plugins. Next, rename each plugin folder inside with the suffix _disable. 

After, you can rename each plugin folder back to its original name to detect which plugin is causing the issue.

5. Check Your .htaccess File

One of the most common reasons for the HTTP 500 Server Error is a corrupted .htaccess file. To resolve the issue, you need to rename the .htaccess file to disable it. 

Access cPanel > File Manager > public_html. Here, search for the .htaccess file. If you cannot see it, click on Settings. 

Select Show Hidden Files (dotfiles). 

Show hidden files .htaccess

Save and exit this window. You should see the .htaccess file now.

Now rename the  .htaccess file to .htaccess_disable. 

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.

htaccess and index php files

Now visit your WordPress site to see if the HTTP 500 Error is gone. If it did, there’s one more step you need to take. 

Go to your wp-admin panel > Settings > Permalinks. Here, just click the save button without making any changes. This action will create a fresh .htaccess file.

6. Check File Permissions

This is not so common, but it happens on occasion that incorrect file permissions cause the HTTP 500 Error. 

File permissions grant access to read, write, and execute files on your site. You can learn more about WordPress File Permissions here.

WP file permission

We recommend permissions be set to the following:

  • wp-admin: 744
  • wp-content: 744
    • wp-content/themes: 744
    • wp-content/plugins: 744
    • wp-content/uploads: 744
  • wp-config.php: 764
  • .htaccess: 764

You can also refer to WordPress recommended File Permissions.

To check and set the file permissions, you can use cPanel > File Manager in your web hosting account.

Permissions in cpanel

Once the correct permissions are in place, it might resolve the HTTP 500 Error. If it doesn’t, we still have a few more steps to go.

7. Check PHP Version 

PHP is a programming language that powers most of the things you see on your website – both on the front end and the back end. Just like WordPress receives updates, PHP also gets updates on a regular basis. 

Your website should be running on the latest PHP version available.

To find out which version of PHP your site is using, log in to your web hosting account. 

Go to cPanel > phpMyAdmin. 

You can view the PHP version of your WordPress site here, like so:

If you’re running an old version of PHP, updating it can resolve the error. We’ve detailed How to Update the PHP Version on WordPress. 

8. Increase Your PHP Memory Limit

Every website is granted a limited amount of PHP memory. If you exceed the limit, you will see the 500 Internal Server Error. 

Fortunately, you can increase the PHP limit quite easily. You need to edit your wp-config.php file for this. Follow our guide on how to increase your PHP limit through wp-config file.

You can access your wp-config file through cPanel > File Manager > public_html. Right-click and edit this file. 

To edit the memory limit, find this line of code:

define(‘WP_MEMORY_LIMIT’, ’32M’);

A PHP memory limit of 128M should be more than enough. So, increase the limit from 32M to 128M using the following line of code:

define(‘WP_MEMORY_LIMIT’, ‘128M’);

Remember to save the file and don’t go overboard with this limit or you may end up crashing your server.

9. Reinstall WordPress 

If none of these steps worked, we recommend reinstalling WordPress. Sometimes, files in the WordPress core installation get corrupted, especially if you’ve been running your website for many years. 

Reinstalling WordPress may seem worrisome because you’ll be replacing core files. But there are ways to do this without any stress. Here’s an in-depth guide to reinstalling WordPress.

CAUTION: This step carries a certain amount of risk. Ensure you backup your site and reinstall WordPress on a staging site first. Once you’re sure it works, you can replicate the changes on your live site. If you’re using BlogVault to backup and stage your site, you can use the Push To Live feature to automatically replicate the changes on your live site.

What To Do If You Can’t Fix The HTTP 500 Internal Server Error

Unfortunately, the HTTP 500 Server Error is a difficult one, so there are rare chances that the error is still unresolved even after taking all these measures.

Here’s what you can do if the error is still present on your website:

1. Contact your web host – It may be a server issue which only your web host can resolve. Connect with the customer support of your web host and give them details of the different methods you tried so far. Request them to check if it’s an issue on their end. 

2. Ask for help on the WordPress Support Forum – WordPress has a very supportive community that is ever ready to help out their fellow WordPress users. You can post the issue you’re facing on the WordPress Support Forum. You should get a response in no time.

3. Check popular forums – You can also check popular forums like Quora, Reddit, and StackOverflow to see what solutions have been provided for the HTTP 500 Error. 

The HTTP 500 Error can be a frustrating one because it can take so long to troubleshoot and resolve. Thankfully, it’s not a permanent issue and can be fixed by troubleshooting properly, identifying the issue, and resolving it as soon as possible.

What Next?

While there are many issues that can prop up while running a WordPress site, the HTTP 500 Error is a dreaded one. In some cases, fixing it is as easy as refreshing your browser. But in other cases, nothing works! 

Plus, resolving the error doesn’t mean it won’t happen again. So it’s best to be prepared and know what to do when you’re faced with this issue:

1. Always backup your website so that you have a copy of your site that you can restore. This minimizes downtime.

2. Create a staging site and use it to troubleshoot the problem.

3. Bookmark this article and keep it handy so that you have a checklist of measures to take to resolve the error fast. 

If one of the steps we’ve mentioned above helped you resolve the HTTP 500 Internal Server Error, give us a shoutout on Twitter. We’d love to hear from you.

Try BlogVault’s Backup & Staging Plugin

Seeing a 500 internal server error where your website should be is enough to throw anyone into a panic. When your website goes down, you lose out on potential traffic and sales. If it’s offline for a while, it can also negatively impact your Search Engine Optimization (SEO) efforts.

Fortunately, there are plenty of ways to go about fixing this error. Many of these solutions are fairly straightforward, and you don’t need a lot of technical know-how to start troubleshooting.

In this guide, we’ll cover what the 500 internal server error in WordPress is and discuss some potential causes. Then we’ll give you 10 tips to help you get your website back in working order.

  1. Back up your website.
  2. Try reloading the page.
  3. Clear your browser cache.
  4. Access your error logs.
  5. Check for the “Error Establishing a Database Connection.”
  6. Look for permission errors.
  7. Increase your PHP memory limit.
  8. Check for problems with your .htaccess file.
  9. Look for coding or syntax errors in your CGI/Perl script.
  10. Ask your web host about potential server issues.

Let’s get started!

Dealing with the WordPress Internal Server Error?

Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

What Is the 500 Internal Server Error?

The 500 internal server error is frustratingly nonspecific. When the error occurs, you usually don’t get many details about it. In fact, you might not receive any information at all.

An example of a 500 internal server error screen.

The 500 error is a generic issue that isn’t specific to WordPress. Chances are you’ve seen it before during your internet explorations. Despite the name, it doesn’t necessarily mean that something is wrong with your server. It could be an issue with your website or browser.

If you do see this error on your site, you’ll want to get it fixed as quickly as possible. A 500 error can impact your SEO if allowed to linger. If your site is crawled while it’s offline, there’s a chance that Google may interpret the error as an issue with your website.

This error can also hurt your User Experience (UX) and give visitors the impression that you’re unprofessional. Not only can a poor UX affect the way Google ranks your site, but it can cause you to lose customers as well. After all, you can’t do business if your site isn’t accessible.

A wide variety of situations can result in the 500 error, making it a bit of a chore to sort out. Potential causes of the 500 internal server error in WordPress include:

  • Plugin compatibility issues
  • Exhausted PHP memory limit
  • Corrupted files
  • Coding or syntax errors

The fact that the error message itself tends to be vague doesn’t help. Fortunately, you can solve many of these issues on your own with a bit of know-how.

Variations on the 500 Internal Server Error

Depending on your operating system, browser, and the cause of the error, there are variations in how it will appear. For example, if a database connection can’t be established, you might see something like this:

An error establishing a database connection message.

A plain white screen, sometimes referred to as the White Screen of Death (WSoD), can indicate a 500 internal server error.

A blank browser window due to a 500 error.

Also, many site owners have the option to customize their 500 error messages. So you might see this error in many different forms.

How to Fix the 500 Internal Server Error in WordPress (10 Tips)

Now that you’ve had an introduction to the 500 internal server error, it’s time to discuss how to resolve it. Let’s take a look at ten tips you can use to fix this issue in WordPress.

1. Back up your website.

Before tinkering under the hood, it’s always smart to make a backup of your website. If DreamHost hosts your site, you can take advantage of our one-click backup feature. You can also create a manual backup if you prefer.

To make a complete backup, you’ll need to save copies of your WordPress files as well as your databases. You can back up your site’s files using a Secure File Transfer Protocol (SFTP) client such as FileZilla.

Once you’re connected to your server, navigate to the WordPress files you want to save. These files include the WordPress core installation, plugins, themes, images, and more. To save the files, simply right-click on them and select Download.

How to download WordPress files via SFTP.

Now you’ll need to back up your database, which you can do by logging into phpMyAdmin. Select the database you want to download from the left-hand panel, and then click on the Export tab.

You’ll then need to choose between a “Quick” or a “Custom” export. The Quick export will likely work just fine unless you need to manage more advanced options.

Options for downloading a WordPress database using phpMyAdmin.

Click on the Go button, and your download should start. Once your website is safely backed up, you can get to work on fixing that 500 error.

2. Try reloading the page.

Let’s start with the best-case scenario. Some situations that cause a 500 internal error clear up on their own within a few minutes. For example, if you’ve just made changes to a plugin or theme, or if your host is experiencing unusually heavy traffic, you may see a server error. If this is true in your case, you’re in luck, as a simple page reload should get things back to normal.

Therefore, the first thing to try is simply waiting a minute or two, during which the error will hopefully resolve itself. Then you can try reloading the page by pressing F5 or (command + R if you’re using a Mac).

3. Clear your browser cache.

Another potential server error fix that’s quick and easy is clearing your browser cache. It’s possible the cache became corrupted, which would cause problems when attempting to access websites.

First, you might check Down For Everyone Or Just Me. This will determine whether there’s a widespread problem or you’re the only one experiencing difficulties.

Amazon.com’s status on Down for Everyone or Just Me.

If you’re alone in your 500 error frustration, the problem may be your browser. Try accessing your site from a different browser. If an alternative works, it’s a sign that the issue is with your cache.

In Google Chrome, you can clear your cache by pressing Ctrl + Shift + Delete. Alternatively, you can click on the three vertical dots in the top-right corner, followed by More tools > Clear browsing data.

Options for clearing the browser cache in Chrome.

Be sure to check the Cached images and files box. Then click on the Clear data button.

In Firefox, you can clear the cache using the Ctrl + Shift + Delete keyboard shortcut. This will open the Clear Recent History window. In the Time range to clear drop-down menu, select Everything. Check the Cache box, and then click on OK.

Options for clearing browser data in Firefox.

In Safari, you can navigate to the History menu item and choose Clear History. Keep in mind that this will delete everything, including cookies and visited pages.

How to clear the browser cache in Safari.

Once you’ve cleared your browser cache, you can attempt to access your website again. If you’re still seeing the 500 internal server error, it’s time to move on to more involved fixes.

4. Access your error logs.

Your site’s error logs may provide insight into what’s causing the 500 error. Depending on your host, these logs may be cycled quite often, so you’ll want to take a look as soon as possible.

You can check your error logs by accessing your site’s files via SFTP and looking for the /logs directory. Next, select the site that’s experiencing the error. You may see several directories at this point. You’ll want to check the one with the most recent date.

Error and access log files accessed via FileZilla.

You can view the log by downloading it and opening it with your preferred text editor. Hopefully, your error logs will provide you with some additional context for the 500 error.

Another option is to enable the WordPress debug log. You can do this by connecting to your site via SFTP and opening your wp-config.php file. Within it, look for the following line:

define('WP_DEBUG', false);

Once you find it, replace it with the following:

define( 'WP_DEBUG', true );

define( 'WP_DEBUG_DISPLAY', false );

define( 'WP_DEBUG_LOG', true );

This will create a debug.log file, which you can find under the /wp-content/ directory. Just be sure to change the WP_DEBUG value back to “false” when you’re done troubleshooting.

5. Check for the ‘Error Establishing a Database Connection.’

If there’s been a problem establishing a database connection, not only will your site be offline for visitors, but you won’t be able to access the WordPress admin dashboard either. There are a few possible causes of this:

  • Incorrect database login credentials
  • A corrupted WordPress database
  • A corrupted WordPress installation file

Let’s start with incorrect login credentials, as this is a common cause of the database connection error. If you’re a DreamHost user, you can find your database credentials in your panel. However, if you use a different host, you’ll likely follow a similar procedure.

Navigate to MySQL Databases and find the one that corresponds to your website under the Database(s) on this server section. Here, you’ll find your database name under the Database heading. The username is listed under the Users Access column.

Alt-text: Where to find your MySQL username in DreamPanel.

To find the password, click on the username. On the next screen, scroll down and click on the Show button next to the password field.

How to find your database password in DreamPanel.

Next, you’ll compare these credentials to those in your wp-config.php file. You can access this file in your site’s main directory via SFTP. Once you have the file downloaded, open it and verify that the information under MySQL Settings matches what you found in your panel.

Checking MySQL settings in the wpconfig.php file.

Next, if your database is corrupted, you can quickly repair it through phpMyAdmin. Log in and click on your database in the left panel. Select all of the tables in the database, and then choose the Repair table option from the drop-down menu.

Repairing a database in phpMyAdmin.

Finally, let’s look at how to handle a corrupted WordPress installation file. Start by downloading a new copy of WordPress and unzipping the file. You’ll need to delete the wp-content folder and the wp-config-sample.php file.

Deleting files from a new WordPress installation.

Upload the rest of the files to your site via SFTP, overwriting any existing ones. You now have a brand new, uncorrupted WordPress installation. You’ll also want to clear your browser cache before checking your website again.

6. Look for permission errors.

If any of your files have permissions set incorrectly, you may see the 500 internal server error as a result. Again, you can check and change these permissions using SFTP.

Right-click on any file and select File permissions to open a new dialogue window. In this window, you can check and, if necessary, set new permissions for the file.

Checking and updating file permissions using FileZilla.

Typically, you’ll want to set files to “644” and directories and executables to “755”. However, you may want to check with your host if you’re unsure about the correct values.

7. Increase your PHP memory limit.

Another reason you might see the 500 internal server error is if you’ve exceeded your server’s PHP memory limit. There are several ways to increase your limit, and they all involve using SFTP.

Before you try increasing your memory limit, you may want to start by seeing what it’s currently set to. You can do this through the WordPress admin dashboard. Keep in mind that, with some variations of the 500 error, you won’t be able to access the dashboard. If that’s the case, you may have to skip this step.

From your WordPress dashboard, navigate to Tools > Site Health. Click on Info at the top of the screen, and scroll down to the Server section. You should see your PHP memory limit there.

How to check your WordPress site’s PHP memory limit.

To increase the PHP memory limit, there are a few files you can edit. One is your .htaccess file, typically located in your site’s root directory. Open the file and add the following code:

php_value memory_limit xxxM

You can replace the “xxx” with your desired amount of memory. Usually, 256M is plenty.

You can also increase your memory limit by editing your php.ini file. You should be able to find this file in your root directory. If not, you can go ahead and create one. Add or update its code to the following:

memory_limit = xxxM

Another option is to add in the following code at the top of your wp-config.php file:

define('WP_MEMORY_LIMIT', 'xxxM');

If this resolves the 500 error, your next task will be to figure out what is causing the memory limit exhaustion. It could be a problematic plugin or theme. You might consider reaching out to your host for help on finding the exact server diagnostics.

8. Check for problems with your .htaccess file.

Your .htaccess file is one of the core WordPress files. It contains rules for your server, so it could contribute to a 500 internal server error.

If your .htaccess file has become corrupted, you’ll want to go ahead and create a fresh one. Start by logging into your site via SFTP and finding your .htaccess file. Rename the file to .htaccess_old.

Renaming a file in FileZilla.

Now, create a new .htaccess file in your text editor and paste in the following:

# BEGIN WordPress

RewriteEngine On

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

# END WordPress

Go ahead and upload your newly created .htaccess file. Then refresh your site in your browser, and check to see whether the error message is showing.

9. Look for coding or syntax errors in your CGI/Perl script.

If you’re running Common Gateway Interface (CGI) scripts, any coding errors you’ve made could result in a 500 error. To unearth potential issues with your CGI scripts, log into your site using Secure Shell Access (SSH).

Once you’ve logged in, you can troubleshoot your CGI with this command:

[server]$ ./cgi_name.cgi

The terminal should return a general error message and the line number the culprit is located on. From there, you can work your coding magic!

When working with CGI, there are a few best practices to keep in mind to avoid problems. First, it’s wise to use a plain text editor to ensure that you maintain ASCII format. When you upload scripts, you should also be able to select ASCII mode in your FTP client.

Changing the transfer type option in FileZilla.

Finally, if necessary, upload to the cgi-bin directory on your server. Then you can double-check your files’ permissions once you have them uploaded.

10. Ask your web host about potential server issues.

If all else fails, there may be a server issue, which only your host can confirm. Unfortunately, if your host’s server is experiencing a problem, you may have to wait out some website downtime.

If you’re a DreamHost client, you can check the DreamHost Status page. This resource provides you with information on all of our services.

The DreamHost status page.

If you run into any problems while trying to repair the 500 internal server error, you can always reach out to our tech support team. They’re ready and waiting to lend you a hand! If you’ve followed the tips in this guide, you’ll have plenty of valuable information for the technician.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Additional WordPress Error Reading

Want to learn more about fixing common WordPress errors? We’ve put together several tutorials to help you if you encounter any other issues.

  • How to Fix Syntax Errors in WordPress
  • How to Fix the WordPress Not Sending Email Issue
  • How to Fix the Error Establishing Database Connection in WordPress
  • How to Fix WordPress Error 404 Not Found
  • How to Fix the Sidebar Below Content Error in WordPress

Let’s Get Your WordPress Website Back on Track

While having to sort out a 500 internal server error isn’t exactly fun, it’s also not as painful as you might imagine. With a little patience and the tips we’ve provided, you should be able to make some progress on getting your website back online.

You can start small by refreshing your page and clearing your browser cache. Then you might want to move onto more involved fixes, such as increasing your PHP memory limit. If you’re not able to resolve the error on your own, DreamHost’s award-winning tech support is just a click away.

When you do run into errors, it’s easier to get back up and running when you have a reliable hosting provider. DreamPress is fast, secure WordPress hosting with powerful features to help make your site a success!

Updated on

How to Fix 500 internal server error wordpress

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.

How to Fix the

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.

solve 500 Internal Server Error on Your WordPress Website

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.

basic-htaccess-file-wordpress

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

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

How to fix 500 internal server error

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.

  1. Get the latest WordPress zip (or tar.gz) file.
  2. Unpack the zip file that you downloaded.
  3. Deactivate plugins.
  4. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
  5. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
  6. Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
  7. 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.

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.

Fixing the internal server error in WordPress

Here is a quick overview of the topics we will 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 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 uses and which browser you use.

Here is how the Apache error page may look:

Internal server error page on Apache

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:

Google Chrome http 500 error

For beginners, this can be incredibly frustrating. No clue or message will 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 are experiencing without telling them where the pain is.

However, if you know the common causes that trigger this error, then you 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 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 just 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 use 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.

Clear 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.

Update permalinks to regenerate .htaccess file

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 replace the .htaccess file manually. First, you need to log in 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 log in to your site using FTP or the 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.

Rename .htaccess file

Next, you need to create a new .htaccess file.

Inside your site’s root folder, right-click and then select the ‘Create new file’ option in your FTP client or File Manager app.

Create new htaccess file

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.

Edit .htaccess file

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 the 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 consumes 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 are 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 the 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 file backup in case something goes wrong.

When you’ve saved that, you can right-click on it and select ‘View/Edit.’

Edit wp-config file

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 the PHP memory limit in WordPress.

Note: If 256M doesn’t solve the problem, then try increasing it to 512M.

If you see 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:

  1. Create a blank text file on your computer and name it php.ini
  2. Paste this code in there: memory=256MB
  3. Save the file
  4. 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, you are in for 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.

Deactivate all 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, navigate to the /wp-content/ folder and rename the plugins folder to plugins.deactivated.

Plugins deactivated via FTP

WordPress looks for plugins in the plugins folder. If the plugins folder is not found, 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 individually 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 determine 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 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 the theme.

Activate a default theme

If you don’t have a default theme installed, you can click on the ‘Add New’ button at the top and install a default theme (Twenty Twenty-Three, Twenty Twenty-Two, and so on).

If 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.

Download theme folder

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.

Download a default theme

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 the file by right-clicking on it and then selecting ‘Extract All’. Mac users can double-click on the zip file to extract it.

Extract theme files

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.

Upload theme 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 is corrupted.

First, you will need to visit the WordPress.org website and click on the ‘Download’ button.

Download WordPress

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.

WordPress folder extracted

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 the wp-admin, wp-includes, and 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 wordpress folder and upload them to your website.

Upload core WordPress files

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’.

Overwrite WordPress core files

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.

Debug log

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 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.

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. Here’s our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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

Интересное по теме:

  • Ошибка 500 фанук
  • Ошибка 500 при установке битрикс
  • Ошибка 500 ты опять все сломал
  • Ошибка 500 винлайн
  • Ошибка 500 при скачивании файла

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

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