How to Fix WordPress 404 Error – Page Not Found [Tutorial] Best of 2023

For a very big CMS platform like WordPress. it’s best for a user who is not familiar with coding. in this WordPress, it’s possible to get 404 Errors. “404 Not Found” error is a common issue faced by WordPress users. It occurs when a user tries to access a page or post on a website that can’t be found. This error can be frustrating for visitors to your website and may lead to a decrease in traffic. A server is software that receives your request to access a web page. It runs only a couple of security checks on your HTTP request and takes you to the web page.

404 "page not found"

But sometimes you face a message showing on your screen “WordPress PAGE NOT FOUND” or “WordPress The requested URL was not found on this Server” while using the site.

Now if you get any 404 error message then you don’t have to get stressed as it is a very common problem that users face while using WordPress. In this article, we will provide you with all the essential information about how to fix the error 404 page not found WordPress. So keep reading!!!

Ways How to Fix WordPress 404 Error

This type of error may occur due to the .htaccess file or something wrong that happened to the rewrite rules. You just have to update the permalink settings and modify the .htaccess file. Where .htaccess (hypertext Access file) is the configuration file of a website.

This configuring file is used to run Apache Web Server software. Any alteration in this file can cause an error.

Here are the steps of how to remove 404 error WordPress.

Reset Permalink

Now the question arises What are permalinks? Permalinks are the permanent URLs to your individual pages and blog posts. The URL to each post should be permanent and never change to be known as the permalink.

To fix the URL with a WordPress 404 error have to update your permalinks settings and change rewrite rules. There are two methods through which you can reset these permalinks.

1st method

  • Login to your account and go to the admin dashboard.
  • Go to settings and Click on permalinks.
  • Select the plain radio button option.
  • Scroll down and click on Save Changes.

Now your permalinks have been reset and you won’t find any 404 error message and you can check your posts, pages, and images.

If this method doesn’t work then you can try another method in which you can do these changes manually given below.

2nd Method: Do it manually

If you need to reset permalinks manually then you have to access and edit your .htaccess file which is located at the root of your site. You can access your .htaccess file through SSH, command line, FTP, or cPanel.

As FTP stands for File Transfer Protocol. It is a “means of transport” i.e. it is used to transfer files from one local computer to a remote website, such as a WordPress blog.

Also, cPanel is also known as a control panel which is basically a web hosting panel based on a Linux system and provided by many hosting providers.

It provides a website with all the automation tools to simplify the process of hosting a website.

There are two ways through which you can edit your .htaccess file in WordPress manually:

  • The first way is to download a copy of your .htaccess file and then modify it in a text editor which is compatible. Here as an editor, users have the authority to edit, write, publish, and delete posts. This includes posts that are written by other users. Then re-upload it on your site by replacing the original .htaccess file.
  • The second way is to use SSH or FTP clients such as Filezilla to modify your .htaccess file directly on your server and then click on Save Changes.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Fix Custom Post Types

In this, you have to check if your custom post types have unique titles and slugs. If any two or more posts have the same title then they need to be altered.

Just a single post/page can contain the same slug or URL. So make sure to change the WordPress permalink not Working. Otherwise, it will show a 404 error message on the screen.

Still, WordPress Posts Returning 404 Errors?

If you tried the above methods and still you are getting an error message then you need to troubleshoot the issue further. This error may occur due to your theme. So To resolve this error just try another theme to install and activate it. To get resolve your 404 Error follow the steps:

  • Activate the WordPress twenty-seven theme.
  • Go to the Appearance tab and click on themes.
  • Click on activate when you find the WordPress default theme.
  • Now if you don’t find any 404 error message on your screen then your theme was creating this 404 error problem.
  • And If you still find the error then switch to your previous theme and deactivate all the plugins. This might help you to remove the 404 error.

Change and update WordPress URL in the database

If you encounter any 404 error message saying that “WordPress URL not found. If you entered the URL manually, please check your spelling and try again.”, then follow the steps given below:

  • Go to your database name and Choose wp-option.
  • Now change the URL like your website URL is https://www.xyz.com/blog replace it with http://localhost/blog

 WordPress Page Not Found After Changing URL

If you didn’t want your 404 Error page you can also redirect the 404 error page to the homepage in WordPress To do this you have to install some plugins like Redirection, 404page or you can also do it manually by adding some line of code in you 404.php file. Follow the steps to redirect the 404 error post or page to the homepage:

  • open your 404.php file in your theme’s folder.
  • If it is not found then create a blank PHP file.
  • Now paste this code on that file.

<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(‘url’));
exit();
?>

And now it’s done. if any user opens this URL it will be redirected to the homepage.

Get in touch with our support team

If the above methods are not at all useful and you are still having trouble resolving the 404 errors then don’t panic.

Our support team is just one call away to help you. You can contact our professional experts and they will listen to you and will try to provide effective solutions to your problem.

For any Technical help and support Dial, WordPress customer service number +1-855-945-3219.

Also Read:
11 essential tips to ensure your WordPress Security
4 Simple Ways to Backup Your WordPress Site
WordPress Maintenance – An Advance Guide
8 Signs Indicating Your WordPress site Hacked



Leave a Reply