4 Ways to Fix WordPress Permalinks Not Working (Visual Guide)

Blog WordPress
Zee Ahmed
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

In this guide, I’ll explain all the possible ways to fix the error “WordPress permalinks not working” with screenshots for clear understanding.

I know WordPress has weird issues.

But don’t worry, you’ll never face the issue as we have done the homework for you.

Let’s discuss the basics first.

What are the Permalinks in WordPress?

The permalinks in WordPress are the permanent URLs of your posts, pages, tags, and categories that exist on your WordPress website.

URL stands for Uniform Resource Locator, a mechanism to retrieve resources from a computer network or hosting where your WordPress is stored.

For example, the permalinks of our pricing and portfolio are https://onesmartsheep.com/#Pricing and https://onesmartsheep.com/portfolio/.

Permalink 1

Why are Permalinks Important?

Permalinks are the foundation of any successful website on the internet; your blog has no existence without them.

Here are the few reasons why permalinks are crucial:

Shorter Urls And Higher Google Rankings Are Strongly Correlated 1536x1057 2

  • Google indexes your content using the permalinks. You should keep a descriptive permalink like yourblog.com/fix-wordpress-permalink that clearly shows the blog post is about fixing the broken permalink issue.
  • Permalinks help in link building. You get backlinks from other websites when they link back to you using your permalink.
  • Permalinks make it easy to share. You can send an email to your colleague about the article you just wrote on your blog and can share on social media like Facebook, Twitter and Reddit.

What Causes ‘Permalinks Links Not Working’ Error?

There are several reasons why permalinks return a status code of 404 —broken permalinks:

1. Installing Security Plugins

When you install a new plugin, your WordPress might be ending up with broken permalink links on your WordPress site provided it deals with .htaccess directly or indirectly.

I have seen the issue arising when a security plugin is activated that tightens your WordPress site’s security.

The best way is to read the plugin’s description to learn how the plugin works under the hood. Most plugins warn if they might interfere with something that can break your entire website.

WP Hide 1

2. Updating the Core, Plugins, or Themes

WordPress frequently releases core updates that might cause conflicts with your WordPress plugins and themes ending up the error “WordPress permalinks not working 404”

WordPress Updates 1

Not all developers are committed to ensuring to keep their plugins and themes updated.

Old WordPress Plugin 1

Similarly, it happens when you update your plugin or WordPress theme. That’s why it’s recommended to trust the developer who keeps their plugins and themes updated and have no shocking stories in their reviews.

3. Migrating & Restoring

The most common cause of broken permalinks is the migration of your WordPress website from one hosting to another.

One hosting might be using one server configuration, and the other hosting has different configurations. Moreover, web server software might be different, as well.

Three major web servers dominate the internet market:

Server 1

  • Apache
  • Nginx
  • Cloudflare Server
  • LiteSpeed

Similarly, when you try to back up your website and restore it to another hosting server, you might get the same issue.

So make sure you have the same web server configuration and web server software. If not, you’re more likely to get an error.

Don’t worry; I’ll explain how to fix it.

4. Broken .htaccess and Permission

.htaccess is a server configuration file, generally located in your website’s root directory—for example, yourblog.com/.htaccess. The user cannot see or download it.

Here is how the default file of .htaccess looks like:

Did you know?

.htaccess decides the fate of your permalinks. You cannot edit your permalink provided you enable the mod_rewrite module.

In some cases, .htaccess permission is disturbed. Make sure the default permission is set to 644.

How To Fix WordPress Permalinks Not Working [4 Ways]

The things you need to fix your broken permalinks are:

  • Access to your WordPress
  • FTP confidential
  • Patience

Let’s discuss the first way

1. WordPress Reset Permalinks

The fastest way to resolve the issue is to reset the permalinks.

Sign in to your WordPress, navigate to Settings > Permalinks. Set any “Common Settings” recommended is “Post name” and hit “Save Changes.

Permalink In WordPress 1

In most cases, the setting fixes the issues.

How to see it worked?

Simply visit your website and open any page or post. If it opens without any error, congratulations, you have successfully fixed the issue.

If the method doesn’t fix your 404 URLs, move on to the next fix.

2. Deactivating the Culprit Plugin

Plugins are the main sources of WordPress headaches in causing bugs and helping hackers compromise your websites.

Plugins Are The Main Reason WordPress Gets Hacked 1

The broken permalink error is mainly provoked by a WordPress site that uses plenty of plugins, you might have no idea which plugin caused the issue.

It’s better to deactivate all the plugins and check either your permalinks are working or not.

Go to Plugins > Installed Plugins > select all the plugins > choose Deactivate > Apply.

Deactivate All The WordPress Plugins 1

Now visit your website and check the URLs if working properly. If not, you should try the next method.

Some people might not have access to the WordPress Dashboard. In this case, you should try cPanel or FTP.

If you use cPanel hosting, sign in to your hosting account. Find the cPanel link and click it.

Sign In CPanel 1

 It opens your cPanel and finds File Manager.

File Manager Of CPanel 1

If only one website is installed on your hosting, you’ll see your WordPress is located in public_html. If you own plenty of websites, you’ll notice a folder on the left side of the File Manager.

Once you dive into the folder, find wp-content, and open it.

Wp Content 1

You’re just a few clicks away from solving your issue. Open the plugins folder.

Open The Plugin Folder 1

In order to deactivate the plugin, all you need is to rename the folder name. It automatically deactivates the plugin instantly upon renaming it.

Rename The Folder 1

It cannot be automated, so you need to change all the plugins’ folder names manually.

In order to activate a plugin, you should re-name the plugin as exactly before.

The same process can be executed using the FTP client, mainly with Filezilla. Type your hostname, username, and password.

Filezilla FTP Access To Plugin Of WordPress 1

If you use DigitalOcean, Vultr, or Linode, you should put /var/www/html/wp-content into the Remote site box in order to access the plugin folder.

Just right-click the folder and choose rename. You can put any number or alphabet in the end in order to deactivate a plugin. Please take a note of the original folder name.

Rename The Folder In FilzZilla To Deactivate The Wordpress Plugin 1

When you find the plugin that causes the issue, you have two options:

  • Permanently delete the plugin.
  • Send a support ticket to the plugin owner.

Do you want to send a support ticket to the plugin owner? It’s simple.

Go to WordPress.org, and search the plugin and open it.

Click The Plugin 1

Click the Support section.

Support Section 1

Now create a free account and post a topic that addresses your issue. Before you type your issue, you should explore for a similar problem with the search box’s help.

Create A Topic 1

For example, the SEO Yoast plugin has caused 404 errors in permalinks and the developers provided its simple solution.

Permalink 404 On Yoast Plugin Update 1

3. Fixing the .htaccess File

.htaccess is a tiny file but can break your entire website. It is utilised to redirect URLs, create custom permalinks, enable password protection ob your website, and show custom 404 pages.

To fix the broken .htaccess file, you must have access to your cPanel or FTP. Let’s assume you own a cPanel hosting. Sign in to your hosting account and go to the cPanel and choose File Manager.

File Manager Of CPanel Location 1

If it’s your first time, you cannot see .htaccess since the .htaccess is hidden for security reasons.

Can’t see the .htaccess file? Don’t worry; click the Settings button and enable “Show Hidden Files.” 

Htaccess Hidden File 1

Firstly, we need to check either the .htaccess has the true permissions code. Right-click the .htaccess file and choose the option “Change Permissions.”

Change Permission Of .htaccess File 1

The default code of the .htaccess file should be set to 644.

Htaccess Default Permission 644 1

It means the .htaccess file has the ability to be read and written by your website, but the world — the users, browser, and bot — can only read it.

Secondly, you need to view the access to inspect the code written inside that is causing the conflict.

Sometimes many plugins interfere with .htaccess and break your site, creating especially the SEO and security plugins.

Right-click on the .htaccess file and choose Edit.

Edit The .htaccess File 1

It warns you to back up the file before you make any changes. It’s a good practice creating a backup before making any significant changes, especially when you deeply have no idea about the code. Just click Edit.

Edit The .htaccess File Back Up The Original File 1

Here is the complete overview of my .htaccess file. Your file may look totally different than mine.

Htaccess 1

Delete everything and paste the below code:

# BEGIN WordPress

# The directives (lines) between “BEGIN WordPress” and “END WordPress” are

# dynamically generated, and should only be modified via WordPress filters.

# Any changes to the directives between these markers will be overwritten.

<IfModule mod_rewrite.c>

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

Don’t forget to make Save Changes.

Save Changes 2

The process is the same for FTP as well. Put the confidential as shown in the screenshot below.

Htaccess Edit In FTP 1

As the site is hosted on a cloud computing platform, you may need to type “/var/www/html” into the remote site area to access your WordPress website.

Htaccess Edit In FTP 3

I use Microsoft Visual Code Editor; here is the look of the .htaccess file when I opened the file.

Htaccess File In Visual Code Editor 1

I deleted everything and pasted the code.

Default .htaccess File 1

Now save the file with Ctrl+S in Windows and Control+S on Mac. Once saved, exit it. Filezilla will automatically detect the changes. Click Yes in order to keep the file on your hosting server.

The File Has Changed 1

That’s it.

If it doesn’t work, delete the .htaccess file and try again. Make sure you download it for backup purposes.

4. Enabling mod_rewrite

In some cases, the above three methods might not work since the directive mod_rewirte is missing to function correctly.

In order to allow the Mod_write module, type the following in the terminal:

sudo a2enmod rewrite

This will trigger the module or alert you that the module is currently permitted. To place these changes into effect, restart Apache.

sudo systemctl restart apache2

Mod_rewrite is currently fully enabled. At the next step, we’ll set a .htaccess document that we will use to specify rewrite rules for redirects.

If you’re using any other service, make sure to enable rewrite_module in Apache.

Rewrite Module 1

Didn’t work yet? And in some cases, make sure to set the following directives:

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

Don’t forget to restart the service or the VPS. Without restart, your changes might not take any effect.

It’s better to discuss to your hosting provider about the rule they have set up for the mod_rewrite. Good hosting companies have experts who have dealt with this kind of issue and enable the module by default.

Final Thoughts

Broken permalinks are frustrating, mostly when you have acquired a new client or moved to new hosting to speed up your site.

Not only it might destroy your reputation, but it also hurts your SEO rankings. URLs are a significant ranking factor; even a slight change in the URL might lose link juice.

The easiest fix is to re-enable the permalinks from the settings in WordPress. If it doesn’t work, you might need to find a plugin that interferes with your server configuration, especially a security plugin like Wordfence.

Fixing the .htaccess file can solve the majority of the issues, but in extreme cases, enabling mod_rewrite fixes everything.

Let us know in the comment section if any of the methods work for you. We’ll be glad to know about it.

One Smart Sheep Package 1 1