Select Page
How to Fix the 404 Error for WordPress Websites

How to Fix the 404 Error for WordPress Websites

WordPress 404 not found error indicates that your server is unable to find the posts or pages in your site. This error can occur unexpectedly, or in some cases, after you make changes to your WordPress site.

Fixing this error is usually an easy process. In this guide, we will take you through the steps to solve posts returning 404 error in WordPress.

We love WordPress as it is a very powerful, yet very flexible CMS. And we are not the only one, as it powers more than 30% of the Internet. But, that flexibility can be a double-edged sword. Sometimes, you just do too much, overtaking some settings and the whole hell breaks loose, random errors start appearing, and your site goes down. Thankfully, because WordPress has so many users, finding help is not that hard.

We have done a series of articles covering the most common WordPress errors, explaining to you how to fix them. For example, we have done an article on How to fix briefly unavailable for scheduled maintenance, or Maximum Execution Time Exceeded errors. You can also ask for WP Help.

Of course, if you are unable to fix issues yourself, you can always contact-us, and get your site back to full speed ASAP.

Save Permalinks

Very often, the solution to 404 error in WordPress is simply saving your permalinks. Doing this will update your .htaccess file with the correct configurations for your WordPress website.

To save permalinks, login to your WordPress dashboard and go to Settings > Permalinks.

Next, scroll to the bottom and simply click Save Changes. 

Now try accessing your posts to see if the issue is resolved.

Manually Reset Permalinks

If saving the permalinks did not solve your issue, you can manually reset it by editing your .htaccess file.

To do this, access your website files using FTP. When connected via FTP, locate your .htaccess file and edit it.

Add in one of the following codes, save, and upload the updated file to your server:

A) When your site is in the main domain

If your site is on the main domain, e.g. www.yoursite.com, add this code to your .htaccess file:


# BEGIN WordPress

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

# END WordPress
After editing and uploading the file, refresh your site and access posts and pages to see if this fixes your issue.

B) If your site is in a subdomain

If your site is installed in a subdomain, such as blog.yoursite.com, use this code instead.
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

C) When your site is in a subdirectory

If your site is on a subdirectory, such as www.yoursite.com/blog, edit .htaccess to include this code instead.
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

404 error messages can appear in any browser or any operating system. Most 404 errors display inside the internet browser window just as web pages do.

A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn’t be found on their server.

To be clear, the 404 error indicates that while the server itself is reachable, the specific page showing the error is not.

404 Not Found error messages are frequently customized by individual websites. So, keep in mind that the 404 error might show up in just about any way imaginable depending on what website it’s shown from.

Related Articles

Do I Need a Website for My Business?

Do I Need a Website for My Business?

If your business has gotten this far without a website, you might be wondering: do I need a website for my business? What’s the point if my business is already successful without one? The short answer is that there has never been a better or more important time to...

How To Go Live on Facebook 2020

How To Go Live on Facebook 2020

Before you can live stream to Facebook, you’ll need to download streaming software such as OBS Studio or  StreamlabsStreaming software allows you to show a computer screen and use broadcasting equipment when streaming to Facebook, YouTube, Twitch or Mixer.
The process to set up your streaming software depends on the software you’re using. 
Copy and paste the Server URL and stream key to your encoding software. Each encoding software has its own configuration.
In most cases, you need to find and edit stream settings and configure a Custom Streaming Server or RTMP Server as the type and enter the copied server URL and/or stream key. Review your encoder’s help documentation for more information on configuring a custom RTMP stream.

To create a live stream on Facebook:

2. Click Create Live Stream.

3. Choose where you want to post your live broadcast.

4. Select Use a persistent stream key if you want your stream key to be permanent. If this isn’t selected, you won’t be able to use this stream key again after the stream ends.

5. Copy and paste the server URL and stream key or persistent stream key into the settings of your streaming software and start the video stream from your encoder. A preview screen will appear.

6. Write a description and title for your live stream.

7. Click Go Live Now. If you want to schedule your broadcast for later, click Schedule a Live Video.

During your live stream, people will be able to react and comment. You can write replies to comments or respond to them in your streaming broadcast.

If you’re live streaming to your timeline, you’ll be able to choose your audience. When you end your live stream, it will stay where you shared it as a video post.

You can embed your live stream on a website. Select a page then click Stream below Settings to get an HTML code

Don’t share your Stream Key or Persistent Stream Key. Anyone who has access to your stream key information can stream video to your post.

Keep in mind that you won’t be able to use a stream key again after your live stream ends, unless you select Use a persistent stream key when creating your live stream.
A persistent stream key is permanent and can be used again after a live stream ends. You can only broadcast one live video at a time with your persistent stream key.

Related Articles

Do I Need a Website for My Business?

Do I Need a Website for My Business?

If your business has gotten this far without a website, you might be wondering: do I need a website for my business? What’s the point if my business is already successful without one? The short answer is that there has never been a better or more important time to...