How to Fix WordPress Page or Posts Returning a 404 Error

By
Updated July 28, 2018
No Comments
5

How to Fix WordPress Page or Posts Returning a 404 Error


Tony Notermann

Experienced website design and SEO business owner skilled in Search Engine Optimization (SEO), Wordpress Web Design, Google Search Console and Analytics, Keyword Research, and Link Building.

Have you ever found yourself frustrated when seeing a “404 page not found” error? This article will relieve your frustration and walk you through the steps to fix this pesky error.

Possibly, equally as frustrating, is seeing the unable to upload an image to WordPress error.

These errors do exist and happen to everyone, know that your content is safe and still exists. Now on the fix for the 404 page not found error.

Resetting Permalinks

Permalinks are a permanent, unique, and specific URL to each corresponding posts, categories, and other pages within your website.

Within your admin dashboard, go to Settings > Permalinks – make note of your current setting, as you will be temporarily changing it. Select the Plain radio button and click Save Changes at the bottom of the page.

Once this option is saved, select the previous setting (the one you might note of in the previous step), and click Save Changes one more time.

The permalink settings have been reset, go ahead and check your posts, categories, and other pages. The 404 error should not appear. However, these are pesky errors, if this step didn’t work, you need to manually reset your permalinks in the .htaccess file.

Resetting Permalinks via the .htaccessfile

 **It’s always recommended that you save a copy of your .htaccess, should something go wonky, you can revert to the save file.**

Option 1:

If you don’t have custom edits in your .htaccess file, you can simply delete the file. Go back to your admin dashboard, go to Settings > Permalinks > Save Changes. This option will automatically regenerate the .htaccess file.

Option 2:

For this step, you will need to access and edit your .htaccess file located in the root of your site via a FTP program or your hosting company’s file manager.

You have two options for editing the .htaccess file.

  1. Download a copy of your .htaccess file, edit the file using a compatible text editor (TextEdit for Mac and Notepad for Windows), upload the edited file to your site.
  2. You can edit and save the .htaccess file directly on your server with a FTP client. Here are a few free FTP clients:

FileZilla – Free and open source for all platforms. FileZilla is definitely the most popular solution.

WinSCP – A free and open source option, but only for Windows users.

Cyberduck – Available for Mac and Windows and it’s also free and open source.

 

Manually Resetting The .htaccess File

To manually edit the file, using option 1 or 2 listed above, copy and paste the code snippet below into the .htaccess 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

Now that you have a saved file on your server, your .htaccess file is updated and the errors should be resolved.

Further Troubleshooting

In cases where the above doesn’t resolve the errors, you have a few more options.

Activate the default WordPress theme (2015, 2016, 2017). Go back to your admin dashboard, go to Appearance > Themes > Select Theme > Activate.

Check to see if the error persists; if so, your theme is causing the issue. You can contact the theme author and they can fix the issue.

If the error persists, switch back to your theme and deactivate your plugins.

Go back to your admin dashboard, go to Plugins > Installed Plugins > Deactivate for each plugin you have installed.

After all the plugins have been disabled, check to see if the error persists. If not, reactivate plugins one by one, each time checking to see if the error returns. When it does, the last plugin you reactivate is the issue, you can contact the plugin author and they can fix the issue.

Conclusion

These are pesky errors, and you knew the posts, categories, and other pages existed on your website, even through you saw the 404 error. Now you know why it happens and how to fix the issue.

  •  
  •  
  •  
  •  

Related Posts


Tony Notermann

Experienced website design and SEO business owner skilled in Search Engine Optimization (SEO), Wordpress Web Design, Google Search Console and Analytics, Keyword Research, and Link Building.

Free Marketing Audiobook

Leave a Reply

Be the First to Comment!

Notify of
avatar

Ready to get started?

Get a free consultation now