WordPress Admin and Page Returning 404 Error- Fix it Easy Way

Undoubtedly WordPress is awesome, but your single mistake can make it worse. If you will do anything wrong you may run in problems. Some of them may drive you crazy like WordPress 404 not found is also one of them.  This error means that the client-side which is your, or your website visitor’s web browser, is able to successfully connect to the website’s server, but it is not able to find the actual resource, page or file that was requested.

What is 404, Not Found Error

404 not found error means that the server has not found anything matching the Request uniform resource identifier also known as URI.  Also, there is no indication of the given error if it is temporary or permanent. This ( the requested URI) may be available in the future if requested by the client. Here you can see a list of all http error codes.

404 Not Found Error Message Types

So till now, you have got the understanding of what a 404 message is. 404 is a common message, But generally, it represents different error messages because of different browsers and different servers. Here are some of the different name variations-

404 Error
404 File or Directory Not Found
404 Not Found
404 Page Not Found
Error 404 Not Found
HTTP 404 Not Found
HTTP Error 404
Not Found
Page Not Found
The page cannot be found
The requested URL /~ was not found on this server. That’s all we know.
The requested URL [URL] was not found on this server
We can’t find the page you’re looking for.

Wordpress page and post 404 not found error

404 not found error in WordPress

In WordPress, we generally encounter the “404 not found” error on the front end, means while accessing your website or blog. On the backend, everything works fine and will not show any error. Most of the time new user think that all the posts and pages are gone now. Because all the WordPress post and pages will show 404 not found error. So no need to worry about all the data, posts, pages and images, these are still there.

How to fix WordPress page not found but it exists

When your blog working fine on the backend and showing 404 error on the front end, it means there is something wrong with the front end posts and pages. Generally, the Home page of your website will work fine in this case and other pages and posts of your WordPress blog will show the not found 404 error. You can fix this issue by using 2 methods.

But hold on the First Step First– If this is your site make sure you are accessing the right website address. Do not manually write the site page links, always follow them from your dashboard area. As an example, the link of this post is https://apanwar.com/wordpress-404-not-found/ and in the browser address bar, I write it https://apanwar.com/wordpress-404-not-foun/ or deleted the “d” accidentally. Now it will turn to a 404 not found. So you should be careful.

1. Fixing 404 not found by accessing the WordPress admin dashboard

You can fix it by simply saving the Permalinks in your WordPress dashboard. To do this you should navigate to

WordPress Dashboard ->Settings -> Permalinks and then click on  “Save Changes” button.

You have no need to make any changes there, just go there and hit the Save button. Most of the time this solves the 404 not found page issues in WordPress. But if this still not solved, there are chances that your .htaccess file is write-protected.

2. Fixing 404 not found by using cPanel or FTP

If the earlier step does not solve the issue, then you should add the code manually to .htaccess file. To do this you should have access to FTP or cPanel. Login to your cPanel and open FileManager or using FTP login to your server with given details( you can ask your hosting provider for these details). You should also use an FTP client to access server files. You can use Filezilla for this. It is free software. After login locate the .htacess file. This file will be in your root location of WordPress installation you will also see the wp-includes and wp-content folders there. Note that .htaccess is a hidden file and if this is not visible there you should make visible the hidden file. If you are still not able to see the .htaccess file, Simply create it and write the given code to this file

# 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

After saving the .htaccess file, open and reload the site you can also try Ctrl + F5.

How to Fix 404 not found error for WordPress admin dashboard area

You can also face this error while accessing your sites dashboard area. Here are the solutions if you stuck in this situation and not able to access your WordPress admin dashboard.

1. Edit wp-config.php file

If you see this notification 404 Not found The requested URL  . . . was not found on this server. Generally, this error encounter after moving a WordPress site from one server to another, subdomain to domain, localhost to live site or when you change your domain name.

I assume you do not have access to the WordPress admin dashboard, because when you try to access dashbaord it shows you this message The requested URL  . . . was not found on this server. So you should have access to the server via FTP or cPanel to edit wp-config.php file. it will be in your root location, where you can also see wp-content and wp-includes folders.  Edit wp-config.php file and add this code:

define(‘WP_HOME’,’yoursitename’);
define(‘WP_SITEURL’,’yoursitename’);

Please note that you should replace “yoursitename” with your actual site name. In my case, the site name will be https://apanwar.com

2. Editing .htaccess file

If you face The requested URL [ any url] was not found on this server. You should add the given below content to your .htaccess file. The instructions already are given about this file.

# 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

 

3. Security plugin

You may accidentally disable the wp-admin URL by using security plugins. Most of the security plugin changed the default wp-admin and wp-login.php links so that no one can assume your login URL. And when you will try to access your dashboard by writing wp-admin or wp-login.php at the end of your site name, it will show you the not found error.

So you should check if you have recently installed any security plugin. Check its configuration if you have already opened the admin area.  If not you should access the server by using FTP or cPanel and rename the security plugin folder. It will be located at/public_html/wp-content/plugins/, here you have to find the plugins folder name. it may be itheme security or wordfence or any other plugin. After renaming the plugin folder, the respective plugin will get disabled and you can try again to access the wp-admin and it will work now. Some time misconfiguration of security plugin can also lead to Sorry you are not allowed to access this page error.

4. It can be due to https and http in the database

Check your database by using phpMyAdmin. Open wp_options table and check for site URL, in sitteurl it may be set to “HTTPS” instead of just “HTTP”. Change it and try to access your site with wp-admin again. It will work now.

This generally happened when websites migrated from one host to other host or doing a live site from localhost.

5. Plugin or theme conflict

You may also face 404 not found for the wp-admin area due to themes or plugins conflict. So you should access the server by cPanel or FTP and try renaming the plugins one by one and check the wp-admin area if working.  If you still facing the issue it means your theme may be also faulty. So simply activate any default WordPress theme. Sometimes old or outdated WordPress themes do not work properly with all plugins and even with WordPress core too so you should check it by disabling them.

I hope the steps given above will help you solve WordPress 404 not found issue. You can fix it by using the WordPress dashboard or by accessing FTP or cPanel. If you do not have access to the WordPress dashboard or if this is not working for any reasons then you should use the second method by accessing the server files.

I will be more than happy when you will let me know if this is a real help for you.

About the Author: Arvind Panwar

avatar
  Subscribe  
Notify of