We’ve had moments where everything looked fine in WordPress, but the post link showed a 404 error instead. No changes to the content — just a missing page that should have been there.
This usually pops up after tweaking settings, switching themes, or adding code that silently affects permalinks. It can catch you off guard, especially if the rest of your site is working perfectly.
Whenever we run into unexpected 404 errors, we follow a simple process to get the post URLs back on track — no guesswork, no heavy troubleshooting. And that’s exactly what we’re sharing with you in this guide.
You’ll be able to fix the 404 errors and make sure your posts are loading the way they should.

Why Are My WordPress Posts Returning a 404 Error?
There are several reasons why your posts might be showing a 404 “Page Not Found” error in WordPress. These can include:
- Plugin or theme conflicts: Sometimes, plugins or themes you’ve installed on your site can interfere with how WordPress handles permalinks. This can lead to broken links and 404 errors.
- Custom code issues: If you’ve added custom code to your website, there might be errors in the code that are affecting permalinks or causing other conflicts, resulting in 404 errors for your posts.
- Issues with your .htaccess file: The .htaccess file plays a role in how WordPress structures URLs. If this file is corrupted or missing, it can lead to 404 errors for your posts or pages.
How to Find All WordPress Posts With 404 Errors
Before we get to the solutions, it’d be good to figure out if this error is just happening to one or two posts or multiple posts. This way, you can determine the scope of the problem and choose the most appropriate solution.
One easy way to figure this out is to use Google Search Console. If you haven’t submitted your site to Google Search Console already, then read our guide on how to add your WordPress site to Google Search Console.
Once the Google bot has crawled and indexed your site, Google Search Console will then provide you with detailed information about your site’s performance, including any 404 errors it encounters.
To find out which posts are returning 404 errors, you can log in to the Search Console dashboard. Then, navigate to the ‘Pages’ report, and you will see a detailed list of all the errors.

For more information, you can read our list of tips for using Google Search Console to grow website traffic, which includes some tips on how to fix 404 errors with the tool.
That being said, let’s look at how to fix WordPress posts returning 404 errors. You can use the links below to jump straight to different solutions:
- Method 1: Check for Plugin or Theme Conflicts and Custom Code Issues
- Method 2: Fix Your Permalink Settings
- Method 3: Update the WordPress .htaccess File
- Method 4: Contact Your Hosting Provider
- Method 5: Enable mod-rewrite (Local WordPress Installation)
- Frequently Asked Questions About WordPress 404 Errors
- 🎁 Bonus: Additional Guide on Handing 404 Errors
No time to fix 404 errors yourself? WPBeginner Pro Services can help! With our affordable Emergency WordPress Support, you can hire experts to fix 404 errors, broken links, redirect issues, and much more. Stop stressing over WordPress issues and get them fixed! Schedule Emergency WordPress Support Services today!
Method 1: Check for Plugin or Theme Conflicts and Custom Code Issues
Sometimes, plugins, themes, or custom code you’ve added to your WordPress website can interfere with permalinks or cause conflicts, leading to 404 errors. We’ve even experienced it ourselves when we’re testing tools on our demo site.
One way to solve this problem is to temporarily deactivate plugins. Plugins can sometimes disrupt how WordPress handles links.
Once you’ve deactivated the plugins, you can reactivate them one by one while checking if the 404 error reappears after activating each plugin. If the error shows up after activating a specific plugin, that might be the culprit.
You can then do a quick Google search for solutions related to that plugin or contact the plugin developer for support.
Similarly, your WordPress theme might be causing the conflict.
To check, you can temporarily switch to a default WordPress theme like Twenty Twenty-Three or Twenty Twenty-Four. All you need to do is go to Appearance » Themes and click ‘Activate’ on a default theme.

If the 404 error disappears with the default theme, it indicates a potential conflict with your current theme. You can then try troubleshooting the theme or consider using a different theme.
You can check out our expert pick of the most popular WordPress themes for recommendations.
If you’ve recently inserted code snippets to your website, there might be errors in the code causing the 404 errors. Take a close look at the code you added and see if you can identify any mistakes.
The safest way to add code snippets to WordPress is with the WPCode plugin. This plugin lets you insert custom code without directly working with the theme files, reducing the risk of breaking your website.
Plus, whenever WPCode spots an error in your code, it will automatically deactivate the snippet and ask you to check it. You can also use the testing mode to check if your code works before pushing it to your live website.

If none of these solutions work, move on to the next method where we’ll troubleshoot your permalink settings.
Method 2: Fix Your Permalink Settings
WordPress posts can return 404 errors because of problems with rewrite rules in your .htaccess file. In most cases, you can fix the problem by updating your permalink settings.
Simply go to Settings » Permalinks in your WordPress admin, and click on the ‘Save Changes’ button.

There is no need to make changes to the permalink settings themselves. This will update your permalink settings and flush the rewrite rules.
In most cases, this solution fixes the WordPress posts 404 error. However, if it does not work for you, then you probably need to update your .htaccess file manually.
Method 3: Update the WordPress .htaccess File
Before you start, make sure to back up your WordPress .htaccess file first. If something goes wrong, you can easily restore the original file.
Now, you’ll need to connect to your server using an FTP client like FileZilla or the File Manager in your hosting control panel.
Next, find the .htaccess file in your site’s root folder—this is the same directory that contains folders like /wp-content/
and /wp-includes/
.
Right-click on the file and select ‘File permissions’ or ‘Change permissions’ from your FTP client.

If WordPress couldn’t write to the file before, try changing its permissions temporarily to 666 to make it writable.
After that, go back to your WordPress admin area and resave your permalink settings. This allows WordPress to regenerate a proper .htaccess file.
Once that’s done, make sure to change the file permissions back to a more secure setting: 644. This setting allows WordPress to read the file, while still protecting it from unauthorized changes.

Alternatively, you can manually edit the file.
Simply right-click on the .htacccess file and then select View/Edit option.

The file will open in plain text editor like Notepad or TextEdit.
Now you need to add the following default WordPress rewrite rules:
# 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
Method 4: Contact Your Hosting Provider
If neither of the solutions above has fixed the WordPress posts returning 404 error, then we recommend contacting your WordPress hosting provider. There may be an error on their end, or they might be able to help you troubleshoot the problem.
Please also see our guide on how to properly ask for WordPress support and get it.
Method 5: Enable mod-rewrite (Local WordPress Installation)
If you are using a local server for testing purposes, then you will need to enable mod_rewrite in the Apache configuration of your MAMP, WAMP, or XAMPP site.
This will allow WordPress to generate clean URLs and prevent the 404 error for posts and pages on your local server.
How you do this will differ by the platform you use. People using XAMPP can open their control panel and click the ‘Config’ button within Actions. Then, select ‘Apache (httpd.conf).’

Next, you will need to find this line #LoadModule rewrite_module modules/mod_rewrite.so
and remove the ‘#’ to uncomment it.
This will load the mod_rewrite.

Then, look for lines that say AllowOverride None
and change them to AllowOverride All
. This tells Apache to allow the use of .htaccess
files.
You’ll typically find these inside <Directory>
blocks—especially the one pointing to your site’s folder, like htdocs
if you’re using XAMPP. If you’re unsure, it’s okay to apply the change wherever you see it inside the file, as long as it’s not a system directory. For local testing, this usually works just fine.

Once done, you can save the httpd.conf file and close it. After that, in the XAMPP control panel, click ‘Stop’ on the Apache module and ‘Start’ again to restart it.
Then, go back to your admin dashboard to see if your permalinks are working.
Video Tutorial
If you need visual instructions, then just watch the video below.
Frequently Asked Questions About WordPress 404 Errors
Encountering 404 errors on your WordPress site can be confusing. Below, we’ve answered common questions that can help you troubleshoot and fix the issue more effectively.
1. Why am I getting a 404 error on my WordPress posts?
This usually means WordPress can’t find the post at the requested URL. It can happen due to broken permalinks, a corrupted .htaccess file, deleted posts, or a plugin/theme conflict that changes how URLs are handled.
2. How do I fix a 404 error in WordPress?
Try resaving your permalink settings by going to Settings » Permalinks and clicking ‘Save Changes’. If that doesn’t work, check your .htaccess file, disable plugins, or switch to a default theme to rule out conflicts.
3. How can I find all 404 errors on my WordPress site?
You can use Google Search Console to see a list of 404 errors Googlebot encounters. Plugins like Broken Link Checker can also help spot broken links and missing pages inside your site.
4. What does the .htaccess file do in WordPress?
The .htaccess file controls how URLs are processed. WordPress uses it to manage permalink structure and route URLs to the correct content. If it’s missing or corrupted, URLs may stop working correctly.
5. How do I safely edit the .htaccess file?
You can edit it using an FTP client or your hosting file manager. Always back it up first. After editing, make sure the permissions are set to 644 so it stays readable and secure.
6. Why do my WordPress category or tag pages show 404 errors?
This can happen if your theme doesn’t support archive templates, or if permalink settings are misconfigured. Resaving permalinks and checking your theme’s archive support can help fix it.
7. How do I fix 404 errors for custom post types?
Visit Settings » Permalinks and click ‘Save Changes’ to refresh rewrite rules. Also, check that your custom post type is registered with the right rewrite settings and has archive support if needed.
8. Can I redirect 404 pages to my homepage or another page?
Yes, plugins like Redirection let you create 301 redirects from old or broken URLs to new ones. You can also create a custom 404 page to guide users back to useful content.
🎁 Bonus: Additional Guide on Handing 404 Errors
You may also find the following resources helpful in managing 404 and other common WordPress errors.
- How to Improve Your 404 Page Template in WordPress (2 Ways)
- Best WordPress 404 Error Page Design Examples
- Best Free 404 Redirect Plugins for WordPress
- How to Get Email Alerts for 404 Errors in WordPress
We hope this article helped you resolve the posts returning 404 errors in WordPress. You may also want to see our guide to the most common WordPress errors and how to fix them, along with our expert picks for the best WordPress plugins to grow your site.
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.
Jen
So for me… I first deleted the WP Fastest Cache out of my Cpanel and THEN…I “bulk deactivated” all my plugins. Did a refresh…and it worked! Praise God!
Then I activated the plugins I still needed. So far so good.
Thanks so much!
WPBeginner Support
Thanks for sharing what worked for you
Admin
nebiyu amde
i have fixed it using the first method. but when i try to get back to my home page from other pages it’s showing me this error: Error establishing a database connection…how can i fix this
WPBeginner Support
To fix that error, you would want to take a look at our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/
Admin
Zeke Yoder
If the problem still persists, you might want to check to see if mod_security is active and causing issues.
I ran into this on a wordpress site hosted by Dreamhost and tried all of the options listed on this page before realizing this was my issue.
WPBeginner Support
Thanks for sharing this should someone else run into the same issue
Admin
Ajit
I’m still facing this issue.
WPBeginner Support
If the methods in this article are not working then you would want to reach out to your hosting provider to see if the error could be caused on that end.
Admin
Bunmi
Thank you.
I have tried deactivating my plugins; I am using theme twenty sixteen. But still, my pages keep loading “the page can’t be found” when I use the custom permalink. I have done the .htaccess, but nothing is working. The post and categories load fine, but pages won’t load unless I use the plain permalink, which is not advisable for SEO purposes.
Please help me.
WPBeginner Support
You may want to check with your hosting provider if you haven’t done so already to see if it could be part of an error on their end.
Admin
Louis
This did not work. .htaccess file is correct but nothing above helped. Still looking for a solution.
WPBeginner Support
You may want to start with our troubleshooting guide here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
miguel
hello, thanks for the post, great.
i have 404 error but cannot acces neither the site or the wordpress. how can you access wordpress admin to solve the problem??
WPBeginner Support
You would use FTP to access your htaccess file for one option and if that does not work you would want to take a look at our tutorial here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Rosy Allan
THANK YOU SO MCUH! sorted
WPBeginner Support
Glad our guide was able to help
Admin
Denise
Awesome! Thanks!
WPBeginner Support
You’re welcome
Admin
Lars
thank you so much – how quick a fix
!
WPBeginner Support
Glad our guide could be helpful
Admin
Avikar
Great info, works perfectly. Got me running again
WPBeginner Support
Glad our recommendations could help
Admin
Vhan
Thank you so much my site is back.
WPBeginner Support
Glad our recommendations could help
Admin
Gabriel Waju
this tips really helpful…thank you so much
WPBeginner Support
Glad our recommendations are helpful
Admin
Theodora
Please i cannot even access the admin area of my page,i also can’t load the page itself at all. What can i do to solve this?
WPBeginner Support
It would depend on the error you are receiving, for a starting point you can go through our guide here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
sudhanshu
Thanks. This been a great help
WPBeginner Support
You’re welcome
Admin
Shahnawaz Ahmad
When i am doing same thing and when i am clicking on Save Changes it also redirecting me to my website with 404 Error
WPBeginner Support
You may want to reach out to your hosting provider to see if they are seeing any errors for your site on their end.
Admin
Victor Carlvin
Came here at first, couldn’t see the solution in the post. Searched the internet for several hours, came back and decided to read the comment section, there I saw the solution to the issue.
A plugin caused it and once I deactivate, update and reactive it, works fine thereafter. Thank you
WPBeginner Support
Thank you for letting us know what solved the issue for you in case anyone else runs into the problem
Admin
Christos
Thank you, i was just getting ready to jump off the building
but your post saved me!
WPBeginner Support
Glad our post could help solve the problem
Admin
Kurnia Sudiar
Thankssss, it works !!!!! it solved my problem
WPBeginner Support
Awesome, glad our guide was helpful
Admin
Fiona
Hi
Thank you very much !
this article is really helpful and solved my problem .
WPBeginner Support
Awesome, glad our article could help
Admin
chioma
The permalink solution worked for me. Thanks so much
WPBeginner Support
Glad our guide could help
Admin
ahmed s
thanks.. i was very close to pulling my hair out. lol.. i was getting the 404 on all my portfolio pages. yikes. easy fix.
WPBeginner Support
Glad our article could help
Admin
Derin
I have tried to click the save button on setting>permalink on my wordpress admin but the problem still persists. I can’t seem to locate the .htaccess on my FTP login. I noticed someone commented about editing the front. I tried checking out the storefront editor, but because I am not a programmer, I am being careful not to cause more damage to the theme. Any help on how to resolve the “404 Page Not Found” permalink problem. It started after a recent wordpress update.
WPBeginner Support
If resaving the permalinks didn’t work you may want to go through our troubleshooting steps here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Babajide Adepoju
a plugin was the problem for me; I deactivated it and had to edit the page somehow. It wasn’t that nice but it worked.
WPBeginner Support
Thanks for sharing what solved your problem
Admin
Gary Leigh
Thanks. This really helped and saved me a lot of stress.
WPBeginner Support
Glad our guide could help
Admin
Charles D
Just have to smile, as I am not the only delighted person. Saved from 3 days of agony
kept getting a broken link mydomain.com/’/menu/category
the /’/ was apparently not linking and your TIP on Go to Settings » Permalinks, and simply click on Save Changes button. worked like a charm cheers
WPBeginner Support
Glad our tip could help
Admin
mark
my issue not solve, 404 is returning when i am updating sub pages
WPBeginner Support
You may want to reach out to your hosting provider to ensure there are no issues on the hosting’s end
Admin
Harry
Perfect! You have saved me lots of time,
So let me just Thank You here
Cheers
WPBeginner Support
You’re welcome
Admin
Claudiu
You are magic:)
WPBeginner Support
Thank you
Admin
Moussa
Thanks the first method works fine for me
WPBeginner Support
Glad our guide could help
Admin
godfrey
After trying everything stated to solve error 404 and couldn’t I decide to edit with front editor and save, vola it started working again.
WPBeginner Support
Thanks for sharing what solved the issue for you
Admin
Qadir Amin
I have applied all tricks like
Changed Permalinks
Changed Theme
Changed plugins
but all in vain, how can i resolve my this error?
WPBeginner Support
If you recreated the htaccess file you may want to reach out to your hosting provider to ensure there are no errors on the host’s end
Admin
Dave
The 404 error has been haunting me for last 3 days now, my problem is that I cannot access anything, no WP dashboard, no website, no cPanel, it’s turning out to be quite a disaster please help me fix this
WPBeginner Support
For a 404 on everything, you would want to start by reaching out to your hosting provider for what they see on their end.
Admin
dave
do you service any word press sites? i need help.
WPBeginner Support
Unless I hear otherwise, we do not have a maintenance service but you can feel free to send us the issue you are running into using our contact form.
Admin
Reddemma
i moved my local wordpress website to server.i changed composts table pointing to server ip and replaced all local host.changed config file and comoptions table also.
But menu links not working in server site.How can i fix this?
WPBeginner Support
You may want to try recreating your menu to update the links.
Czarek
Thank you very much! You save me with this solution
WPBeginner Support
Glad our article could help
Admin
Rephin Perez
Thanks so much !! You have saved my day. Didnt know that Saving the permanent links would fix this issue.
WPBeginner Support
Glad our article could help
Admin
Decode Digital Market
This post literally saved my life. I just had 404 error to all my posts.
All I had to do was save changes in permalinks and it worked.
WPBeginner Support
Glad our article could help
Admin
Carmen
Thank you so much for the information, unfortunately I am still having issues. When I try to click into +Add New Page it takes me to a 404, if I click +Add New Plugin it also takes me to a 404, if I try to add anything new it will take me to a 404, my website is still in the creation process, it is not yet published. I tried to use filezilla, but after multiple attempts doesn’t connect to my file. Do you know what I should do, I would greatly appreciate your answer!
WPBeginner Support
You may want to reach out to your hosting provider to see if they have an error log on there end that points to the issue, your other option would be to go through the steps in: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
alaa mohamed
ok so am not sure if that’s the exact same issue am having. generally, when I access my website I don’t get any 404 errors yet on my SEO audit tool it is shown that my WordPress posts preview page is coming back with a 404 error, can anyone help me get this fixed ??
WPBeginner Support
You would want to reach out to the support for your SEO tool to see if this is a known issue with the tool
Admin
Mathukutty P V
Today enabled minify script/styles in swift performance lite and after that except home page all other links showed 404 error. searched and found this post and on checking found .htaccess empty, added the basic code from this post and 404 error gone. All links are working fine Thanks.
WPBeginner Support
Glad our article could help
Admin
jeremy
please help me out
i dont know whats wrong with my WordPress website, i tried creating a new post when am done, i click on publish but it redirect me to a page not found which 404, please help me out as at now, i cant publish anything on my site nothing is working,
thanks for your help in advance.
WPBeginner Support
To start with you would want to go through our troubleshooting steps here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
If none of those steps work, if you reach out to your hosting provider they may have an error log that can point to the reason for the 404 error.
Admin
Alexander Londono
you just save me a lot of time.
it had take me 2 hours with no solution
WPBeginner Support
Glad our article could help
Admin
Ahmad WABBI
This is a great post. I had a problem with the permalinks when I moved my WP site from a server to another. Your post saved me a lot of time searching for the reason.
Thanks
WPBeginner Support
Glad our article could help
Admin
Babar Waheed
hi
your all articles are easy to understand step by step with screen shots guide thanks for writing
I have a free classified website in word press. advertisers are posting ads in my website but few of them not meet with our terms and conditions so we delete those ads when i delete ads i get a message by word press.
(You just trashed a Post. Search engines and other websites can still send traffic to your deleted post. You should create a redirect to ensure your visitors do not get a 404 error when they click on the no longer working URL. With Yoast SEO Premium, you can easily create such redirects)
My question is how to fix this problem without buying yoast seo premium?
WPBeginner Support
You can manually redirect the 404s using the method in our article here: https://www.wpbeginner.com/plugins/how-to-track-404-pages-and-redirect-them-in-wordpress/
Admin
Priya
Hello,
My website is under construction right now.
But I still receive 404 error while logging in.
It does not allow me to open my account on wordpress as error arrives immediately after clicking on the log in button.
How to solve this problem so that I can assess wp to complete my website?
Plz give me directions so that I can proceed further as soon as possible.
Thank you!
WPBeginner Support
It would depend on the specific error message but for a starting point you could try the steps in: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Baba nee
Good day, i installed a pluggin. So i can put the google addsense script to my the head section of my blog, after putting this code to the pluggin and updating my permalinks i saved it. It still telling me page not found! How do i fix the error! Is there any other way i can insert this script manually via my cpanel! Please help a brother who is so confused right now
WPBeginner Support
You can take a look at our Adsense guide for how to add the code here: https://www.wpbeginner.com/beginners-guide/how-to-add-google-adsense-to-your-wordpress-site/
Admin
Sapna
These steps seem so simple. But I tried everything. Changing the rights to 666 and 664. Deleting the .htaccess file. Copying and pasting the code didn’t help either.
I even changed the permalink settings to which I desire and rewrite all the pages by hand again. To make sure they get the name I want and to have new page id’s
I tried literally everything. I’m really clueless now. Can you please help me.
WPBeginner Support
To start, if those methods did not work, you would want to go through the general troubleshooting steps in our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Dasuni
Fatal error: Class ‘Email_Before_Download_Form’ not found in /wp-content/plugins/email-before-download/includes/class-email-before-download-shortcode.php on line 65
Why???
WPBeginner Support
Your email before download plugin appears to be having an error, you would want to reach out to the plugin’s support to fix the error with the plugin. For being able to log into your site you should be able to log in once you disable the plugin: https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
Admin
Darshan Tejani
Hi. I liked the simplicity in the Tutorial. Sadly, it didn’t work for me!
The error goes away only If I change my permalink to ‘plain’. If I change back permalink to ‘post name’, then it shows the error! I’d be grateful If you’d help me out here. Thanks anyway for the post.
WPBeginner Support
If recreating the htaccess method is not working then you would want to reach out to your hosting provider to see if the mod_rewrite rule is enabled on their server.
Admin
Jasmine Martin
thank you!
WPBeginner Support
You’re welcome
Admin