How to Fix Broken Permalinks in WordPress
access_time
hourglass_empty
person_outline

How to Fix Broken Permalinks in WordPress

Running into “404 Page Not Found error when accessing your website? You probably have an issue with broken permalinks. In this article, we will help you find the culprit behind this error and provide you with a comprehensive guide on how to fix it.

What Triggers Broken Permalinks in WordPress?

Various causes may trigger broken permalinks on your website.

  • New plugin installation. The new plugins you install may interfere with your .htaccess file.
  • Restoring a backup or migrating WordPress. You recently restored a backup or switched your site to a new domain or server.
  • Updates. Problems with incompatibility after updating plugins, themes, or WordPress core.
  • Changes in .htaccess file. Updating, or altering your .htaccess file incorrectly.

How to Fix Broken Permalinks in WordPress?

Here are several methods on how you can fix broken permalinks in WordPress.

1. Resetting Permalinks Structure

The simplest way to deal with this problem is by resetting the permalinks structure:

  1. Navigate to your WordPress Dashboard. Go to Settings > Permalinks.
  2. Select an alternative permalinks structure -> Save Changes. For instance, if you’re currently using the Day and name settings. Change it to something else, like Post name.Changing permalink settings in WordPress
  3. Once done, change it back to your standard structure and hit Save Changes once again.

If you’re still getting a “404 Page Not Found” error, let’s try other remaining methods.

2. Disabling Plugins

Deactivate the most-recently installed or updated plugin that might be triggering the error. Otherwise, you can also remove all the installed plugins altogether:

  1. Go to the Plugins menu in your WordPress dashboard -> Installed Plugins.
  2. Click the Deactivate button next to the plugin’s name.
  3. Once finished, reset the permalinks structure using the previous method.

3. Replacing .htaccess File

In case none of the options solved your broken permalinks issue, the issue can be related to your .htaccess file’s configuration. Thus, you should replace your current .htaccess file with the default one.

In this example, we’ll be using Hostinger’s File Manager:

  1. Navigate to hPanel -> File Manager.
  2. Select your domain and press ​Go to File Manager.
  3. Choose the ​.htaccess ​file​ ​in the ​public_html ​folder.
  4. Right-click and select Rename. Then, change the file name (e.g., .htaccess-error).Renaming the .htaccess file in hPanel
  5. Next, click the New File icon at the top of the page. Don’t forget to name it .htaccess.
  6. Paste the code below in your new .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
  7. Once all is done, Save & Close.Editing the .htaccess file in WordPress

Alternatively, you can also run this process by using an FTP client, like FileZilla

If the problem is not solved, try to remember what actions you’ve taken before the error occurred. If it happened after performing a specific update, then restoring a backup might be a reliable option to get your site up and running.

Conclusion

There are plenty of reasons why you can get a broken permalinks issue in WordPress. The bad news is, your website will be inaccessible and will display a “404 Page Not Found” error.

Fortunately, you can effortlessly handle this problem using these three simple methods:

  • Resetting permalinks structure – configure your built-in permalink settings on the WordPress dashboard.
  • Disabling plugins – deactivate the installed plugins in a few clicks.
  • Replacing .htaccess file – replace the .htaccess file from hPanel or using an FTP client.

We hope that this step-by-step tutorial will help you fix broken permalinks on your WordPress website. If you have any more questions, let us know in the comments section below.

The Author

Author

Gediminas B. / @gedziuzzz

Gediminas was a passionate content writer and SEO geek at Hostinger. He started his journey at customer support and aims to use his gathered knowledge to create the most epic content the world has ever seen. From WordPress to server management, there's no topic he can't cover! He also likes cats.

Related tutorials

Author

Liz Reply

February 01, 2018

Hello, I followed your instructions and I was able to fix the error. Thanks. Your content is also easy to understand, especially for those like me who aren't as tech-savvy. Great Job!

    Author

    Gediminas B.

    Replied on February 15, 2018

    Thank you for your kind words, Liz! I am glad to hear that you find out tutorials helpful!

Author

Ashley Reply

March 28, 2019

Thank you!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in WordPress
How To Fix 500 Internal Server Error in WordPress
How To Fix 500 Internal Server Error on WordPress

Close