WordPress админка ошибка 404

So it’s after 8’o clock in the night and one of our customers reports an issue with their website backend to our 24/7 support team. He’s preparing the website for some highly anticipated traffic in a few days so having no accessibility to the website right now is a nightmare about to unfold!

WP-Admin 404 Redirection Problem

So here is what happened in detail. Whilst trying to access the WordPress backend using www.hisdomain.com/wp-admin. The browser tried to load this page however it just redirected to the standard 404 page. Super weird but no need to worry. You aren’t hacked. Here are some quick ways you can fix this issue.

Another potential problem that shares these similar solutions looks like this – when you enter your WordPress credentials and the page just refreshes – no error nothing. Just frustration isn’t it.

DISCLAIMER: Please make sure your website is back-up before attempting this update. When doing updates like this one the risk maybe low but you never want to put yourself in a worse situation. All of the websites we maintain are updated multiple time per day to ensure the moment that something comes up, we have our client covered.

Wordpress 404 Page

WP-Admin 404 Redirection Solution

We’ll look at 4 quick possible solutions that could cause this error. Go through each one and double check to see if you have access as you progress.

  1. Hosting Issues
  2. Plugin Confliction
  3. Caching & Cookies
  4. Htaccess File Corruption
  5. Website URL

1. Check in with your host

Sometimes your website maybe affected by recent updates your host made regarding your server. Before you make any updates on your own be sure to check with your host especially if you didn’t make any WordPress updates recently.

To check your host – log into your hosting account and proceed to your database. You can access your database by going to PHPMyAdmin. If you can access this and your database is available then congratulations. You can cross off your first possible problem off the list and move onto the next problem.

However, if you can access your database, then congrats still. You have found your problem. On the screen there should be an error saying unable to login or a message along these lines in red. Head on over to your host providers support and depending on the host they’ll be able to assist you and provide you with more information to get you up and running as soon as possible.

Now, it’s 2020 and bad host are no longer tolerated, if you have any issues with your hosting, the server quality or the support service, there is no need to suffer. Check out this host provider we use for hundreds of our clients called SiteGround.

2. Plugin Confliction

Now if you are onto part 2 of possible problems and you followed part 1, don’t leave your hosting account. If you have, you can just log back in or open up your FTP account to the website. Plugins are usually the cause of most issues relating to WordPress as they are created by many developers and sometimes they clash with each other. The regular suspects are security plugins, 404 / redirection plugins and other plugins that allow you to change your wp-admin url to another name.

Once logged into your FTP or File Manager go to your public_html folder which contains your website files. Proceed to the WP-Content folder and look for plugins. Get started by removing files one at a time … after every removal revisit your WP-Admin and see if you can login. If you do then you definitely have a conflicting plugin issue.

3. Caching & Cookie Issues

One of the other possible solutions is to clear your cache. Sounds crazy but this actually works. Cookies are a vital part of WordPress especially when it comes to authentication.

Depending on your browser you’ll need to clear your “cookies and cache” for the specific website. Afterwards, go ahead and close your browser and reopen it. Now try to access your website backend. Sometimes you may need to give this a few hours but lets push ahead if it didn’t work for you.

4. Htaccess File Corruption

Note: This was the one that actually that worked for us.

Now before you skip over this because you didn’t change the .htaccess recently. DON’T. We didn’t change the .htaccess file recently either however, plugins can sometimes cause htaccess corruption. Similar to the Caching & Cookies, this file is also vital to the functioning of WordPress. Thankfully, this solution is super easy to solve. Simple open your file manager or go to your FTP and delete this file called .htaccess. If at first you do not see this file however, you will need to show hidden files as this is considered a hidden file. Once deleted – your WordPress application will regenerate a fresh .htaccess file.

5. Website URL

Now if none of the above have work, there is still hope. This last fix should do the trick! You may need to override the website URL. How? It’s simple. Open your FTP or File Manager in CPanel. Look for a file in your website root folder called wp-config.php. Within this file you are going to place the following lines of code below:

define('WP_HOME','http://mywebsite.com');

define('WP_SITEURL','http://mywebsite.com');

Ofcourse, make sure you replace “mywebsite.com"  with your website domain name.

You should be good to go from here! Go back to your website admin panel and check to see if you have access.

If you are on one of our WordPress Maintenance plans feel free to reach out and have someone from our support team assist you. Tired of WordPress error and updates? No problem, check out our plans and speak with a WordPress Consultant today to get started.

[ms-form id=2]

Дек 10, 2020

Anna

7хв. читання

Ошибка 404: Как исправить в WordPress (3 метода)

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

В этой статье мы рассмотрим три способа исправления ошибки 404 в WordPress:

  1. Сброс настроек постоянных ссылок в WordPress (англ).
  2. Восстановление файла .htaccess (англ).
  3. Отключение тем и плагинов.

Однако, прежде чем закатывать рукава, мы поговорим о том, как работает ошибка 404 и какие причины её возникновения. Давайте перейдём непосредственно к этому!

Что такое ошибка 404 в WordPress (и что её вызывает)

Ошибка 404 это сообщение, которое появляется, когда вы пытаетесь получить доступ к странице, которую браузер не может найти. В зависимости от того, какой браузер вы используете, сообщение может незначительно отличаться. Например, Firefox отображает такой текст: «404 Not Found», а Chrome показывает сообщение — «404. That’s an error»:

Так выглядит ошибка 404 в Chrome

Эти сообщения об ошибках по умолчанию могут быть довольно неопределёнными, и любой веб-сайт может настроить собственную страницу ошибок 404 (англ). Это не является необходимым, но это позволяет объяснять посетителям, что сайт работает, и единственная проблема заключается в конкретной странице, которую они пытаются найти.

Независимо от того, как оно выглядит, существует много вещей, которые могут вызвать в WordPress сообщение: 404 ошибка. К ним относятся:

  • Неверный URL. В некоторых случаях ошибка может быть в дополнительной букве, набранной в URL страницы.
  • Проблемы с кэшированием. Иногда браузер может кэшировать страницу, к которой вы пытаетесь получить доступ, и пока она не найдена, вы будете видеть ошибку 404, даже если сайт работает для всех остальных.
  • Проблема с настройками сервера доменных имен (DNS). Возможно, информация о вашем домене ещё не обновилась в DNS, поэтому вы видите ошибку при попытке получить доступ к одной из страниц вашего сайта.
  • Проблемы с совместимостью в WordPress. В некоторых случаях проблемы с плагином или темой могут повлиять на то, как WordPress создаёт URL-адреса и постоянные ссылки для вашего сайта. Затем, если кто-либо попытается получить доступ к URL-адресу, который больше не работает, возникает ошибка 404 в WordPress.

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

Что делать перед устранением ошибки 404 в WordPress

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

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

Как получить резервную копию веб-сайта

После этого вам нужно будет загрузить и настроить FTP-клиент. Мы рекомендуем FileZilla (англ), так как он бесплатный и предлагает все функции, которые могут вам понадобиться. Если вы раньше не использовали FTP, вы можете ознакомиться с нашим подробным руководством о том, как получить доступ к сайту Hostinger напрямую. Затем, когда вы будете готовы, вы сможете приступить к исправлению ошибок WordPress 404.

Как исправить ошибку 404 в WordPress (3 метода)

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

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

1. Сбросьте настройки своих постоянных ссылок (пермалинков) в WordPress

Одной из наиболее распространённых причин ошибки WordPress 404 является проблема с тем, как WordPress генерирует ваши постоянные ссылки (англ). Как вы, возможно, знаете, WordPress предоставляет вам несколько вариантов форматирования ссылок ваших записей и страниц. Например, вы можете настроить платформу для использования простых числовых ссылок или указать название каждой записи в качестве URL-адреса:

Как переустановить постоянные ссылки

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

Если вы можете войти в свою панель инструментов, начните с перехода во вкладку Настройки> Постоянные ссылки. Обратите внимание на структуру, которую использует ваш сайт на данный момент. Вам нужно будет временно изменить её, чтобы сбросить настройки постоянных ссылок в WordPress, но вы измените её всего на мгновение.

Выберите параметр Простой в разделе Общие настройки и нажмите кнопку Сохранить в нижней части страницы:

Как временно изменить структуру ссылок

Страница перезагрузится. Затем вы можете продолжить и выбрать свой предыдущий тип постоянных ссылок и сохранить изменения ещё раз. Это всё, что требуется для сброса структуры ссылок на WordPress.

Теперь попробуйте просмотреть свой веб-сайт как обычно. Проверьте страницы, которые ранее выдавали ошибку 404. Если ошибка ушла, вы молодец – вам понадобилось минимум времени, чтобы её исправить!

2. Восстановите файл .htaccess в WordPress.

Когда вы вносите изменения в структуру постоянной ссылки в WordPress, они сохраняются в файл под названием .htaccess (англ). Этот файл определяет, как WordPress будет взаимодействовать со своим сервером, а также способ создания URL-адресов для страниц.

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

Как найти корневую папку WordPress

Откройте эту папку и найдите файл .htaccess. Если вы используете FileZilla, вам нужно щёлкнуть правой кнопкой мыши по файлу .htaccess и выбрать параметр Просмотреть / Изменить. Это означает, что вы загружаете копию файла на свой компьютер и открываете его с помощью локального текстового редактора по умолчанию. Теперь вы сможете внести любые изменения, которые вам нужны.

Если вы не понимаете, для чего нужен весь код в этом файле, не беспокойтесь. Вы не должны вносить в него никаких изменений, если вы не уверены в них на 100 %. Однако, что вы можете сделать, так это использовать код WordPress .htaccess, который выглядит следующим образом:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

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

После этого сохраните изменения в файле .htaccess с помощью текстового редактора и закройте его. FileZilla спросит, хотите ли вы заменить существующий файл .htaccess копией, которую вы только что отредактировали. Согласитесь на это действие, и всё! Вы просто переустанавливаете свои постоянные ссылки WordPress вручную, не нарушая ничего в этом процессе.

На этом этапе попробуйте снова вернуться на ваш сайт. Ошибка 404 должна исчезнуть, что уже является отличной новостью. Тем не менее, вы по-прежнему можете вернуть предыдущую структуру постоянных ссылок, если вам не нравятся числовые URL-адреса.

Помните, что вы можете изменить способ просмотра ваших постоянных ссылок, перейдя в панель управления и во вкладку Настройки> Постоянные ссылки. Выберите структуру, которую использовал ваш сайт до ошибки 404, и сохраните изменения. Тогда всё должно вернуться к нормальному функционированию.

3. Отключите темы и плагины в WordPress.

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

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

  1. Нажмите кнопку Деактивировать под именем плагина.
  2. Проверьте свой сайт, чтобы узнать, сохраняется ли ошибка 404.
  3. Если ошибка всё ещё существует, повторно активируйте отключённый плагин.
  4. Перейдите к следующему плагину в списке и повторите процесс.

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

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

Как временно изменить тему

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

Если у вас нет доступа к панели управления, вы можете отключить тему и плагины вручную через FTP. Чтобы сделать это, зайдите на свой сайт с помощью FileZilla, затем перейдите в каталог public_html / wp-content. Здесь вы найдёте несколько папок, две из которых называются plugins и themes соответственно:

Как отключить плагины или тему вручную

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

Как переименовать папку

Измените название папки на что-то вроде akismet.disabled, так чтобы вы смогли легко её идентифицировать. Простого изменения названия папки плагина достаточно для того, чтобы WordPress его отключил. Теперь проверьте, не исчезла ли ошибка 404. Если нет, верните этой папке прежнее название и повторите этот процесс для каждого следующего плагина в папке.

Если один из ваших плагинов стал причиной ошибки, вы знаете, как с этим справиться. Однако, если окажется, что ошибка 404 возникает не из-за них, вы можете перейти в каталог тем wp-content> themes. Найдите папку с активной темой и переименуйте её так же, как и плагины:

Как переименовать папку тем

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

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

Дополнительная информация

Ошибка 404 это не единственная проблема, которая может возникнуть с веб-сайтом в WordPress. Вот список наиболее популярных ошибок в WordPress с углублённой информацией о том, как их исправлять:

  • Как исправить ошибку 403 Forbide Error в WordPress
  • Как исправить ошибку 500 Internal Server Error в WordPress
  • Ошибка 502 Bad Gateway в WordPress – причины и как исправить
  • Как отладить и исправить ошибку 503 Service Unavailable в WordPress
  • Ошибка 504 Gateway Time-out и как её исправить в WordPress
  • Как исправить ошибку HTTP при загрузке изображений в WordPress
  • Как исправить ошибку «Извините, вы не можете получить доступ к этой странице» в WordPress

Вывод

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

К счастью, есть много способов решить эту проблему в WordPress, включая отключение тем и плагинов, восстановление вашего файла .htaccess и сброс ваших постоянных ссылок.

Если у вас возникли какие-либо вопросы, советы или рекомендации по работе с ошибкой WordPress 404 – давайте поговорим о них в разделе комментариев!

Author

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

last week, when I tried to access my WordPress dashboard through WP-admin slug, it showed me a 404 page.

So what that meant?

Quite clearly, it means my WordPress installation was not able to find and retrieve the data from the WP-admin directory.

If the same has happened to you, don’t worry. We can solve and get rid of this problem very easily.

It takes only a minute or two. Also, In this tutorial, I will try to simplify the complicated processes as much as I can so if you are a beginner, there’s no need to get nervous.

Remember to take a complete backup of your database before starting out with any of the given procedures.

Let’s get started!

Finding The Cause Of The WP-admin Redirection & Refresh Error

It may happen that every time you hit the login button even with the correct credentials, the page gets refresh and you are returned to the same page and fate as well. The first step you need to take is finding the cause of this problem.

There are several known reasons which might occur and force wp-admin to redirect either to the homepage, wp-login page (refresh error) or a 404 page in the worst-case scenario.

1. Plugin Conflict

Some plugins and the majority of them which are related to secure WordPress are the root cause of this error.

Plugins like hidden login URL slug, 404 managers, security plugins such as Wordfence, etc. create conflicts that other plugins you might have installed.

To check if the main cause of your wp-admin redirect problem is a plugin or not, You have to look through your FTP client.

Since you can’t log in to your WordPress dashboard, you will need to access your plugins directory through an FTP client. FTP or the file transfer protocol helps you to connect your device to your server at the administrator level.

You can use Filezilla or CoreFTP as they both are helpful for beginners as well as high on features.

Here’s how to log in with FTP:-

  1. Get your FTP access credentials (ask your host)
  2. Download and install Filezilla on your PC
  3. Login to your server

Then head on to the WP-content folder which can be located in the public.html folder.

how to edit plugins and themes directory through FTP

Here in the plugins directory, start deleting the plugins one by one. After deleting every one plugin, go back and try to login to your WordPress dashboard. If you are able to log in after deleting any plugin, that means the cause was a plugin conflict.

This usually happens and will solve the issue in most cases.

If the problem still persists, you should check out the other reasons below.

2. Theme Conflict

Themes, the same way a new or an old plugin can be a cause for Wp-admin redirect problems, can be responsible for this error.

For inspecting if the wp-admin redirection problem is occurring by any theme update, change or functions.php file changes, you will have to repeat the same process as you did in the case of plugins.

In this process, you will have to delete the theme by deleting its existence in your themes folder that is located near your plugins directory in the same wp-content folder.

Try deleting the themes, and at the same time try to log in to your WordPress dashboard. This should solve your problem.

If the wp-admin redirection/page refresh problem still persists, do check out the other steps below.

3. Reach Out To Your Web Hosting Support

If neither theme nor the plugins were the cause, it probably means that the problem is with your allocated server i.e. your host.

Before you reach to your hosting support team, let’s make sure the problem is with the servers. For doing this, you will need to launch your PHP my admin area.

PHP my Admin software is used to access the MySQL and MariaDB database. WordPress database is written and runs on MySQL and MariaDB.

To confirm your host is causing this problem, try launching PHP my Admin and access your MySQL database. If you succeed, congrats, your servers, and the host both are fine and working.

If you are unable to access your MySQL database and PHP my admin shows failed login error, you need to ask your host. Contact their support team and they will provide you with all the necessary details on this issue.

If they fail to help you, it is time to move to a better host such as DreamHost.

4. .htaccess File Corruption

It may happen that you added code in your .htaccess file. It may also happen that you never knew about it and did nothing.

.htaccess is a sensitive file that helps WordPress to handle requests between a server and a web browser and it should be handled carefully. Sometimes, it gets corrupted due to reasons like plugin conflicts.

All we have to do to get rid of this wp-admin redirect error is delete this corrupt .htaccess file.

how to edit .htaccess file when wp-admin redirects or refreshes

Simply log in to your FTP client, take a backup of the existing .htaccess file and then delete this corrupt .htaccess file. That’s it.

Go back and check if you can no login to your WordPress dashboard or not. Once you are in your WordPress admin area, go to the settings section and get to the permalinks settings. Do not change anything and click on save. This will generate a new, fresh .htaccess file.

If this didn’t solve your problem, then follow the steps below.

5. Site URL Error

In some cases, when none of the above-mentioned solutions worked this did.

Sometimes, simply updating the site URL solves the problem. All you need to do is:how to edit wp-config file through FTP

  1. Login to your FTP client area
  2. Locate the WP-Config file
  3. Take a backup of it

Then edit it and add this line of code:-

1

2

define('WP_HOME','http://yourdomain.com');

define('WP_SITEURL','http://yourdomain.com');

Replace the “yourdomain.com” with your original domain.

That’s it. Go back to your wp-admin page and try to log in again.

6. Cookies And Cache

If you are still not able to login to your WordPress dashboard, You may need to clear your cache and cookie files.

Cookies enable and help the WordPress authentication and memory process. When you hit the remember me checkbox, it’s cookies that do the function of saving your password and username in the browser.

All you need to do is clear all your browser cache and cookie files but make sure to keep them enabled. Then close your browser and restart it.

By now, you should have gained your access back to the WordPress admin dashboard.

In some cases, you may have to wait a couple of hours before you gain access to your admin area.

If this error keeps happening repeatedly, then there may be something wrong with your web host. Try contacting your web host support or consider migrating to a better web host.

I hope this guide has helped you. You should also check out the guide on how to fix “WordPress service unavailable”.

Do leave a comment below and mention which method worked for you.

Перейти к содержимому

  • Здравствуйте,

    в Общее-Настройки поменяли ссылку у Адрес WordPress (URL) и теперь сайт криво открывается, а также сама страница для входа в админку не загружается и выдает ошибку 404.

    стояла https://www.beautyportal.ee/wp
    поставили https://www.beautyportal.ee/wp/wp-admin

    Пробовали зайти через https://www.beautyportal.ee/wp-login.php но страница не загружается тоже выдает ошибку 404.

    Есть ли возможность сделать откат, чтобы поставить обратно старую ссылку, чтобы всё заработало? Или это можно сделать только через сервер, на котором поставлен WordPress?

    Если второе, то будем смотреть.

    Заранее спасибо

    • Тема изменена 2 года, 10 месяцев назад пользователем itsol.
  • Тема «ошибка 404 на странице входа в админку» закрыта для новых ответов.

You’ve likely seen the “Page Not Found” error before. Unfortunately, if you operate a website of any sort (WordPress or not), the day will probably come when you see the message on one of your own pages.

Fortunately, like many common WordPress errors, 404s are relatively easy to troubleshoot and fix. The solution usually involves restoring your site’s permalink structure — something you can do in just a few minutes.

In this article, we’ll explain just what a 404 error is and what can cause one on your site. Then we’ll walk you through how to fix it in four simple steps. Let’s get started!

Get Content Delivered Straight to Your Inbox

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

An Overview of the WordPress 404 Error

A 404 error, also known as a “Page Not Found” error, indicates that your browser can’t locate the page you’re trying to access. The exact message can look a bit different depending on the browser you’re using, but it will generally always contain either the “404” code or a “page not found” message of some kind.

DreamHost Glossary

404 Error

A 404 error is an HTTP status code that indicates that the page a user is trying to access does not exist. 404 errors can occur for a wide variety of reasons, but they almost always lead to a poor User Experience (UX).

Read More

Websites can also create their own custom 404 pages.

A custom 404 error page.

Seeing this notification (or any other error message) when you’re trying to access your site can be frustrating. While there is a chance that your post has actually gone missing, the vast majority of the time, there’s a more benign cause.

Some common reasons that WordPress posts might return 404 errors include:

  • A mistyped URL. It could simply be attributed to a typo in the URL. This is the most common cause.
  • An issue with your Domain Name System (DNS) settings. If you’ve recently updated any of your DNS information and you’re seeing this error, it could be because the changes haven’t propagated fully. It can take up to 48 hours for this process to complete.
  • Problems with the permalink structure of your site. Permalink problems can be caused by a missing, broken, or corrupted .htaccess file. Compatibility issues with WordPress components such as plugins and themes could also be the culprit.

Regardless of the cause, this error prevents access to your site, so it needs to be resolved as quickly as possible. We’ll look at troubleshooting and resolving the problem shortly.

Skip the Stress

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

Why 404 Errors Matter

404 errors pose several problems for a website, beyond simply preventing you from accessing pages. First, they create a poor User Experience (UX).

If there are many of these errors on your site, and they aren’t resolved quickly, they could eventually turn users away. In the worst-case scenario, those visitors could land on a competing website instead, costing you business.

404 errors can also hurt your Search Engine Optimization (SEO). Search engine crawlers won’t index a page that returns a 404 because they think it doesn’t exist.

What to Do Before Troubleshooting the WordPress 404 Error

Before changing your permalink settings or .htaccess file, it’s a smart idea to create a backup of your website and database. This way, if you accidentally make something worse, you can easily restore your site to a functioning state.

If your website is hosted with DreamPress, backups couldn’t be easier. DreamPress automatically backs up your entire site every day, so you always have a fresh copy to access. You can also create a manual backup with just a few clicks.

How to Fix WordPress Posts Returning 404 Error (In 4 Steps)

With a fresh backup of your site in hand, it’s time to get to work. You’ll want to follow these steps in order and check if the error has been resolved after each one.

Step 1: Reset Your WordPress Permalinks

The first step to try is resetting your permalinks. Head to your WordPress dashboard and navigate to Settings > Permalinks.

The WordPress Permalink Settings page.

From here, just click on Save Changes. That’s right — you don’t actually need to edit anything. Clicking that button will update the permalink settings even if you don’t make any changes. This is important because it also refreshes the rewrite rules used for “pretty permalinks.”

With this done, go ahead and reload the pages you were trying to access. If everything works, you’re all done. If you still get a 404 error, head to the next step.

Step 2: Restore Your .htaccess File

If resetting your permalinks didn’t work, the next strategy is restoring your .htaccess file. This controls how WordPress interacts with the server and how it generates permalinks for your pages. Restoring it to the default settings can fix sudden 404 errors.

To restore the .htaccess file, you’ll first need a way to access it. If you’re using DreamPress hosting, you can use the built-in file manager found in the DreamHost control panel. Most other web hosts offer a similar feature, or you can use a Secure File Transfer Protocol (SFTP) client such as FileZilla. We have detailed instructions for connecting via SFTP if you need help.

For this example, we’ll use the DreamHost file manager. Head to your DreamHost panel and navigate to WordPress > Managed WordPress in the sidebar.

The DreamPress domain settings page.

Find the domain you’re having trouble with and click on the blue Manage button. On the next page, make sure the Details tab is selected at the top, and then click on Manage Files.

The DreamHost file manager.

This will open the file manager in a new tab. Locate and click on the folder that corresponds to your domain name. You’ll find the .htaccess file in this directory (it’s the same one that contains items such as wp-content).

The location of the .htaccess file in the WordPress root folder.

Next, click on the file name and select Edit from the list of options. You can copy the current contents of the file and paste them somewhere for safekeeping. For now, you’ll want to replace the contents with the following:

# 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 is the default .htaccess file for WordPress. When you’ve pasted this in, go ahead and save the file.

Restoring this file will also reset the permalink settings for your WordPress site. Therefore, if you’re using a custom permalink structure (or have changed it at all from the default), you’ll need to restore that setting too.

To do so, head back to your WordPress dashboard and navigate to Settings > Permalinks (just like Step 1 above). You can change it to whatever you were using before and then save it.

Finally, refresh your website and attempt to load the pages that were returning 404 errors. If everything works now, congratulations! If not, proceed to the next step.

Step 3: Disable All of Your WordPress Plugins and Theme

If you’ve reset your permalinks and .htaccess file, but you’re still seeing 404 errors on your site, the next step is to check your plugins and theme. Plugins, in particular, can sometimes have bugs or compatibility issues that prevent a site from loading.

Let’s start there. The basic idea is to disable them one by one and then check your website. If the error persists, turn it back on and move to the next one.

To get started, head to your WordPress dashboard and navigate to Plugins > Installed Plugins.

The ‘deactivate’ button on the WordPress plugin settings page.

Locate and click on the Deactivate button below the first plugin. You can see that active plugins are shaded blue, while those that are off are white (as you can see with Akismet in the screenshot above). Now, refresh your site and see if the 404 error is still occurring.

If you get the error message, head back to the plugins screen, re-activate the plugin you just tried, and move to the next one in the list. If you find one that resolves the issue, you can check for updates that may resolve the problem or find an alternative with similar functionality.

If none of the plugins prove to be the issue, it’s time to try changing your theme. Head to Appearance > Themes.

The WordPress theme manager.

Your currently-active theme is marked as such. Hover over one of the others and click on Activate. Then refresh your site and try to access the problematic page again.

Note that changing your theme can alter your site significantly. So if you find that your theme is the issue, you may need to spend some time finding one that provides a similar look and features.

Step 4: Set Up a 301 Redirect for Moved or Renamed Content

This one is a bit of a bonus step. If you do actually have content that’s been moved or renamed and thus doesn’t exist anymore at the URL you were using previously, you’ll want to set up some 301 redirects to point that old URL to the new one.

The easiest way to do this is with a WordPress plugin such as Redirection.

The Redirection WordPress plugin for managing 30 redirects.

This tool will enable you to quickly set up the redirects you need. Plus, it’s free and user-friendly.

How to Create Your Own “Error 404 Not Found” Page

If you want to set up your own custom 404 error page, you can do so relatively easily. The process involves adding one line to the .htaccess file to point the error to a specific page and then creating that page. We have full instructions for setting up a custom error page to walk you through the process.

Tools to Help You Monitor 404 Errors Moving Forward

Finally, if you want to keep an eye out for 404 errors in the future, you can use a few handy tools. The Google Search Console will show you crawl errors that the Google bots have come across as they index your site. This is a simple way to see all the issues Google is encountering.

You can also enter your URL into a specialized tool such as the Broken Link Checker, which will scan your entire site for broken links and let you know if it finds a 404 page.

The Broken Link Checker tool for finding 404 errors on your website.

It’s free and easy to use. You can simply input your domain and then click on Check Site.

More WordPress Error Tutorials

Want to learn how to fix other common WordPress errors? We’ve created a series of guides to help!

  • How to Fix the 500 Internal Server Error in WordPress
  • 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 the Sidebar Below Content Error in WordPress (In 3 Steps)

Ready to Find That Missing WordPress Post?

A 404 error can be frustrating — especially when it happens on your own site. These messages cause problems with SEO and ruin your site’s UX. Fortunately, they’re not too difficult to resolve.

Fixing 404 pages generally involves restoring your site’s permalink structure and setting up redirects for any posts that are actually gone. You can then use tools such as Google Search Console to monitor your site for future 404s.

If you want to spend less time dealing with errors, consider switching to DreamPress, our managed WordPress hosting service. We’ll take care of all the troubleshooting for you, so you can focus on what matters!

Понравилась статья? Поделить с друзьями:
  • Wordpress выдает ошибку
  • Workcentre 3210 тонер закончился как сбросить ошибку
  • Wordpress включить вывод ошибок
  • Wordpress админка ошибка 403
  • Workcentre 3045 ошибка 2000000