Key Takeaways
- Don’t let 404 errors ruin your website. This guide provides 8 simple solutions to fix the dreaded “Page Not Found” error in WordPress and get your site back on track.
- Learn how to troubleshoot 404 errors, restore your .htaccess file, set up redirects, and more, so you can keep your website running smoothly and your visitors happy.
WordPress 404 errors usually occur when you have removed certain pages from your website and haven’t redirected them to your live pages. Sometimes, these errors may also occur when you have changed the URL of a specific page.
It’s not uncommon to come across the WordPress 404 or “WordPress site permalinks not working” error on your website if it is not appropriately maintained.
There may also be times when your website is under maintenance, and your visitors will be automatically directed to a 404 error page.
In any case, if you’re facing a WordPress 404 error or a “WordPress page not found” error?
Don’t freak out!
In this guide, we’re going to take a look at 8 simple solutions to get rid of the WordPress 404 page not found error.
What Is a WordPress 404 Error?
The 404 error is an HTTP response code that occurs when the server cannot find the file or page requested by the user. In response, the web hosting server automatically sends the user an error message, “404 Not Found“.
The WordPress 404 error commonly occurs when:
- You’ve newly migrated your site to a new host.
- You have changed your URL’s permalink structure and haven’t redirected the old URL.
- You don’t have file permissions.
- You have opened an incorrect URL.
- Poorly coded plugin/theme.
Many WordPress themes offer creative layouts & content options to display the 404 error page. In the case of Cloudways’ managed WordPress hosting, the 404 error has a custom design and layout too:

How Does the 404 Error Affect Your Website?
It’s normal for your website to get 404 errors, often due to factors beyond your control, like users typing in the wrong URL. Yet, too many important pages or links with 404 errors can harm your website’s SEO, leading to potential consequences like:
1) Negatively Impacts User Experience:
Encountering a 404 error ruins the user experience significantly. Imagine having a popular URL with lots of people visiting it, and suddenly the link is broken, and no one can access it. People trying to open the link get frustrated and might leave your site for another one.
This not only makes users trust your site less and causes you to miss out on potential sales, but it also increases your website’s bounce rate. This is a big problem, especially if the broken link is used to get a lot of traffic.
2) Risks Website Penalization:
A high bounce rate and many 404 errors tell search engines, especially Google, that your website isn’t well-optimized. It gets worse because these errors prevent search engine crawlers from fully checking out your site. Google might penalize your site, leading to a drop in SERP rankings.
3) Blocks Page Indexing:
Pages with a 404 error are ignored by Google and other search engines during the indexing process. Fixing this error is crucial for pages you want to rank, making sure they get included in search engine databases.
4) Leads to Traffic and Resource Loss:
Getting a 404 error on a webpage can be a big problem. It means that the page you’re looking for is not available. This can be a waste of time and effort because if other websites have linked to your page, those links won’t work, and people won’t be able to visit your site. This not only loses potential visitors but also wastes the work you put into making your page easy to find.
A Lot of 404 Errors Start With a Bad Migration. Ours Don’t.
When experts handle your WordPress migration to Cloudways, your permalinks, redirects, and URLs move over cleanly with zero downtime. No broken pages, no lost traffic, no troubleshooting guides needed.
How to Fix 404 Error on WordPress (8 Troubleshooting Solutions)
This tutorial will show you how to quickly fix the 404 Not Found status code. So let’s get started!
1. Set Up Your Permalink
If your homepage loads fine but other pages return a 404 Not Found error, simply saving your permalink settings can reset them and resolve the issue. Here’s how:
- Log in to your WordPress Dashboard.
- Go to Settings → Permalinks.

- Click Save Changes without making any modifications. This action refreshes the permalink settings.
If the issue persists, switch to Plain and save the changes.

- Then, switch back to your previous permalink structure (e.g., Post name) and save again..

If it doesn’t work, you’ll need to edit the .htaccess file in the main directory of your WordPress installation (where the main index.php file resides). 404 errors are also usually due to misconfigured .htaccess files or file permission-related issues.
2. Restore Your .httaccess File
Since .htaccess is a hidden file, you must set all files as visible in your FTP.

Note: It’s always recommended to back up your site before editing any files or pages.
Follow the steps below:
- Log in to your server using an FTP client.
- Download the .htaccess file, which is located in the same location as folders like /wp-content/ wp-admin /wp-includes/.

- Open the downloaded file in any text editor.
- Visit the WordPress .htaccess support page and copy/paste the version of the code that is most suitable for your website.
- Save the .htaccess file and upload it to the live server.
For example, if you have Basic WP, use the code below.
# 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
3. Setup a 301 Redirect
If you have changed the URL of any specific page and haven’t redirected it yet, it’s time to redirect the old URL to your new URL. You may redirect your old post/page via a plugin or a .htaccess file.
If you are comfortable working with .htaccess, add the following code to your .htaccess file. Don’t forget to replace the URLs with your own website.
Redirect 301 /oldpage.html https://www.mywebsite.com/newpage.html
If you prefer the easy way, you may use a plugin to set up a 301 redirect. Follow the steps below:
- Install the Redirection Plugin.
- Go to the WordPress Dashboard.
- Click Tools > Redirection.
- Complete the setup and Add new redirection.

While using a plugin is easier for beginners, editing the .htaccess file directly can be more efficient for advanced users. But be cautious when adding redirect rules to avoid conflicts with existing rules.
Here is how you can do this:
A 301 Redirect tells search engines that a page has been permanently moved to a new location. This ensures users and search engines are directed to the updated page while preserving SEO value. This method can be used to redirect individual pages, folders, or even an entire website.
To redirect an old page to a new one, add the following line to your .htaccess file:
Redirect 301 /oldpage.html https://www.yourwebsite.com/newpage.html
For redirecting an entire folder:
Redirect 301 /old-folder/ https://www.yourwebsite.com/new-folder/
For redirecting a whole website to a new domain:
Redirect 301 / https://www.newwebsite.com/
Be sure to test your redirects after applying them to ensure they work correctly without causing redirect loops or conflicts.
4. Disabling Plugins/Theme
An outdated or poorly coded plugin may be causing the 404 error on your WordPress site. To check this, you must deactivate all your plugins and change your current theme.
Note: All WordPress themes have 404.php files but don’t necessarily have a custom 404 error template file. WordPress automatically uses the 404.php page if the 404 error occurs.
You may access your WordPress files using an FTP like FileZilla. Go to public_html > wp-content and change the plugins folder name to something like myplugins.

Now go back to your browser to check whether the website is working. If the error has been resolved, then any of your plugins could be the culprit.
Note: If it’s not resolved, simply change the myplugins folder name to plugins and move to the next troubleshooting method.
If it’s resolved, change the myplugins folder name to plugins and follow the steps below to check which of your plugin(s) is causing the error.
- Go to your WordPress dashboard.
- Go to Plugins > Installed Plugins.
- Activate each plugin one by one and check if your website is working.
- When you encounter the 404 error, you’ll know which plugin caused it.
- Update the plugin or remove it to get rid of the error.

5. Change and Update WordPress URL in Database
You might encounter the following error message on your WordPress website.
“The requested URL was not found on this server. If you entered the URL manually, please check your spelling and try again.”

Fix the error by following the steps below:
- Go to your PHPMyAdmin.
- Navigate to your database name, and select wp-option. For example, blog > wp-option.

- Change the URL, for example, from https://www.abc.com/blog/ to http://localhost/blog.
- Ensure you update both the siteurl and home fields in the wp_options table. Always back up your database before making any changes, as incorrect modifications can cause further issues.

6. Fix WordPress 404 Page Not Found Error on Local Servers
Many designers and developers install WordPress on their desktops and laptops using a local server for staging purposes. A common problem with local server installations of WordPress is the inability to get permalink rewrite rules to work.
You may try to change the permalinks for posts and pages, but eventually, the website shows the WordPress “404 Not Found” error.
In this situation, turn on the rewrite module in your WAMP, XAMPP, or MAMP installation. I am using WAMP in this tutorial. Navigate to the taskbar and find the WAMP icon. After that, navigate to Apache → Apache modules.

It will enable a long list of modules that you can toggle on and off. Find the one called “rewrite_module” and click it so it is checked.

Then check whether your permalinks are working or not.
7. Alternative Method
If none of the above solutions work, you may try the alternative method to fix the 404 error.
- Navigate to the local server.
- Find the Apache folder, then go to the “conf” folder.
- Navigate to the httpd.conf file.
- Search for a line that looks like:
#LoadModule rewrite_module modules/mod_rewrite.so
- Remove the “#” sign so it looks like this:
LoadModule rewrite_module modules/mod_rewrite.so
Additional tip: PHP workers are used while executing your WordPress site’s code. An ecommerce site that gets 50,000 visitors per month needs a lot more resources than a simple blog with the same amount of traffic.
Get Started with Managed WordPress Hosting
Experience hassle-free performance with Cloudways’ Managed WordPress Hosting. Start now and see how easy it is to run your website!
Variations of the 404 Not Found Error
Error messages for the 404 error can vary across different browsers. Here are some different phrases you might encounter:
- “Page Not Found”
- “404 Not Found”
- “The page cannot be found”
- “HTTP Error 404”
- “We can’t find the page you’re looking for.”
- “Error 404”
- “The requested URL was not found on this server.”
- “The requested URL /~ was not found on this server. That’s all we know.”
Conclusion
I hope this guide helped you solve the “WordPress 404 page error” or “WordPress permalinks not working” problem. In this guide, we covered 7 easy solutions to the 404 error. If you’ve figured out any other ways to get rid of this problem, share in the comment section below.
Also, if you are a WordPress user and want to boost your site, you must try Cloudways WordPress hosting solutions and take advantage of its 3-day free trial. Apart from WordPress, Cloudways also support all the leading web applications, including hosting for WooCommerce, Laravel, PHP, Magento & Drupal.
Frequently Asked Questions
Q. Why am I getting a 404 error?
A 404 error occurs when the server cannot find the requested page. This could happen if the page was deleted, the URL was typed incorrectly, or the permalink structure in WordPress is outdated.
Q. How do I test a 404 error?
To test a 404 error, enter a non-existent URL on your site or manually type a broken link. If the page returns a “404 Not Found” message, your site is experiencing the error. You can also use tools like Google Search Console to identify broken links.
Q. How do I fix error 404 on WordPress?
To fix a 404 error on WordPress:
- Go to Settings > Permalinks and click “Save Changes” to refresh the URL structure.
- Check if the page or post exists and has the correct URL.
- Clear your website cache and browser cache to ensure updates take effect.
Q. How to redirect WordPress 404 pages?
To redirect WordPress 404 pages, you can use plugins like Redirection or Yoast SEO to set up 301 redirects. You can also manually add redirect rules to your .htaccess file if you are comfortable with code.
Q. How to edit a WordPress 404 page?
You may edit a WordPress 404 page by following the steps below:
- Visit your WordPress dashboard.
- Navigate to Appearance > Theme Editor.
- Find the file named “404.php file” and edit the file yourself or with the help of a WordPress developer.
Q. Why is my WordPress admin showing a 404 error?
If your WordPress admin is showing a 404 error, it may be caused by incorrect URL structure or plugin conflicts. Try resetting your permalinks by going to Settings > Permalinks and saving changes. Deactivating plugins or switching to a default theme can also help resolve the issue.
Q. What is 404 detection on WordPress?
404 detection on WordPress refers to identifying pages that result in a 404 error. Plugins like 404 to 301 or Redirection can help detect and log 404 errors on your site, giving you the ability to fix broken links or redirect them.
Q. What is error 404 in WordPress search?
Error 404 in WordPress search happens when no results are found for the search query, or the requested search URL is broken. Check if the search page URL is correct or if there are any issues with your search settings or plugins.
Q. What is error 404 categories in WordPress?
Error 404 categories in WordPress occur when a category page is missing, deleted, or incorrectly linked. Ensure the category exists, and the links are correctly pointing to the right pages. Refresh permalinks to avoid broken category links.
Q. How to fix the requested URL was not found on this server in WordPress?
To fix the “requested URL was not found on this server” error in WordPress:
- Update your permalinks under Settings > Permalinks.
- Check for broken links using a plugin or by manually reviewing the URLs.
- Clear cache and ensure your .htaccess file is properly configured.
Sarim Javaid
Sarim Javaid is a Sr. Content Marketing Manager at Cloudways, where his role involves shaping compelling narratives and strategic content. Skilled at crafting cohesive stories from a flurry of ideas, Sarim's writing is driven by curiosity and a deep fascination with Google's evolving algorithms. Beyond the professional sphere, he's a music and art admirer and an overly-excited person.