7 Ways to Fix WordPress Permalinks Not Working

by

wordpress permalinks not working error feature image

Permalinks are the human-friendly URLs you see on WordPress sites. They help people find pages and posts easily. They keep things clear and tidy. They are like street signs for your website.

But what happens when these street signs are wrong?

WordPress permalinks not working is one of the most common WordPress errors. Visitors to your site come to find content, products, and more. Instead, they end up with HTTP 404 errors. These errors mean the page can’t be found, which can frustrate visitors. When permalinks break, browsing your site can become a mess.

In this article, we will show you how to get your permalinks working again. We will also help you understand why this happens so that you can avoid it in the future.

TL;DR: WordPress permalinks are essential for easy site navigation. But when they break, site users cannot access webpages and face HTTP 404 errors. Basic steps like resetting permalinks to more advanced ones like configuring your site server can fix this error.

1. Reset permalinks on wp-admin

Resetting your permalinks through wp-admin is a quick way to fix this issue. Your site’s .htaccess file contains the permalink settings. This process works by updating the .htaccess file. It overwrites the existing settings, which can resolve many errors.

Here’s how you can do it:

1. Log into your WordPress dashboard.

2. Go to Settings.

3. Click on Permalinks. Here, you’ll see different options for your permalink structure.

4. Change your current Permalink structure to a different one. It doesn’t matter which new option you choose. Save the changes after you pick the new structure.

Permalink structure

5. Next, switch the Permalink structure back to your original choice and save it again.

2. Deactivate conflicting plugins

Plugin conflicts can sometimes mess up your permalinks. To fix this, try deactivating your plugins one by one. Start by going to the Plugins section in your WordPress dashboard. Pick one plugin and deactivate it. After deactivating, check your site to see if the permalink issue is gone.

If the problem persists, reactivate the plugin and move on to the next one. Continue this process until you find the plugin causing the trouble. Once you find it, you have two options. You can replace the plugin with a similar one that doesn’t cause issues. Or, you can contact the plugin developers about the problem. They may fix it in an update, and you can use the plugin again after that.

3. Check file permissions

File permissions play a crucial role in how your WordPress site functions. If you’re having permalink issues, check the permissions of your .htaccess file. This file should have the permissions set to 644.

To check this, access your site files through an FTP client like Filezilla or your web host’s file manager. Locate the .htaccess file, right-click on it, and check the file permissions. If it’s not set to 644, you might have unintentionally changed it.

Change the permissions back to 644 if they are different. This ensures the file is readable and writable by you but only readable by others. Correct permissions can help resolve your permalink problem and prevent further issues.

4. Clear WordPress cache

Clearing your WordPress cache can help resolve permalink problems. Sometimes, an outdated cache causes issues that affect your site. The cache keeps copies of your web pages to load them faster, but it can also hold onto old data.

If you’re using caching plugins, make sure you clear their cache too. Most plugins have a simple button in the settings to do this. Go to the plugin’s settings and look for the Clear Cache button. Click it to remove stored data.

Also, clear your browser cache as it might be showing older versions of your pages. By clearing all caches, you allow your site to load fresh information.

5. Check if your links are updated to SSL standard

If you’ve recently updated your SSL settings or moved your site to HTTPS, this can affect your permalinks. Changes like these can create conflicts if your database doesn’t update properly. When your site switches from HTTP to HTTPS, all links need to reflect this change.

To make sure your links are updated to SSL standards, you can use a plugin like Really Simple SSL. This plugin helps update your site links to HTTPS smoothly. All you need to do is install it, activate it, and click Activate SSL on the plugin’s dashboard. It takes care of all the details, so you don’t have to manually fix each link.

ReallySimpleSSL dashboard pre-SSL

By ensuring your site uses HTTPS across all links, you prevent many permalink issues. It’s a critical step in maintaining your site’s health and security. Using a plugin makes this process easy and keeps your site running smoothly.

6. Regenerate the .htaccess file

Regenerating your .htaccess file is a more technical fix but can solve permalink issues. Sometimes, plugins—especially security ones—alter this file. These changes can cause your permalinks to stop working.

Here’s how you can regenerate it:

1. Use an FTP client like Filezilla or your web host’s file manager to find the file. It is usually located in the root folder of your site, typically named public_html or www.

2. Edit the .htaccess file, delete all its contents, and save the empty file.

3. Go to your WordPress dashboard and navigate to Settings > Permalinks.

4. Select your preferred Permalink structure and save the changes. This step rewrites the .htaccess file with the correct settings.

Before doing this, make sure to back up your site. Any custom changes made to the .htaccess file will be lost during this process. Taking a full backup ensures you can restore the important bits of code if needed. This fix resets the default structure and is often effective in resolving permalink problems.

7. Configure your site server

Configuring your site server can help fix permalinks if other methods haven’t worked. If you can access your server, you can change some settings to fix the problem. Here’s how to do it based on your server type:

For Apache servers

1. Regenerate your .htaccess file. Follow the steps mentioned earlier to do this.

2. Find the server’s configuration file. Look for a file named httpd.conf or apache2.conf. It is usually located in the /etc/apache2/ directory.

3. Edit the configuration file. Look for this code:

<Directory /var/www/>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

4. Change the AllowOverride value from None to All. This lets the .htaccess file make changes.

5. Restart your server. Use these commands in SSH to do so:

sudo a2enmod rewrite

sudo systemctl restart apache2

For nginx servers

1. Find the server’s configuration file. Look for default.conf or a file named after your site. It is usually located in the /etc/nginx/ directory.

2. Update the configuration file.

– If your site is in the root directory:

location / {

try_files $uri $uri/ /index.php?$args;

}

– If your site is in a folder:

location /subdirectory/ {

try_files $uri $uri/ /subdirectory/index.php?$args;

}

Here, replace subdirectory with the name of the directory where your site is located.

3. Restart your server. Use this command in SSH:

sudo systemctl reload nginx

These steps can help fix your permalinks. Remember to back up your site before making changes. This way, you can go back if needed.

Why does the WordPress permalinks not working error happen?

WordPress permalinks might stop working for several reasons. Here are some detailed causes:

You installed a new plugin: Adding a new plugin can sometimes add new settings as well. For instance, some security plugins add code to the .htaccess file to function. This might interfere with how your permalinks are structured, causing them to break.

You updated an existing plugin: Updates can introduce new code or features that can change or override your current site setup. These changes might create conflicts with other plugins or themes, messing up your permalinks.

You restored your site from a backup: Restoring a backup can revert your site to a previous state. This might include old permalink structures or settings that don’t fit your current plugins or themes, leading to broken links.

You migrated your site from one web host to another: When moving your site to a new host, all settings might not transfer correctly. This can include permalinks, which might not work if server configurations differ between hosts.

You modified your site’s .htaccess file and made a mistake: The .htaccess file controls how URLs are handled. If you accidentally change or remove important lines of code, your permalinks can stop functioning properly.

Final thoughts

Permalinks are key to navigating your WordPress site. When they break, users see errors instead of your content. This can harm your site’s performance and traffic. Fixing permalink issues can be simple. Start with basic steps, then move to more advanced fixes if needed. The aim is to keep your site easy to navigate.

Always test any changes like updates, installs, etc. on a staging site before making them on your live site. Remember to also back up your site to avoid losing data. With the right approach, you can maintain smooth site navigation and help users find what they need.

FAQs

How do I fix permalinks in WordPress?

To fix permalinks in WordPress, go to your dashboard and navigate to Settings > Permalinks. Change your permalink structure to a different option and save it. Then, switch back to your original structure and save again. If that doesn’t work, try deactivating plugins one by one to find any conflicts. You can also check your .htaccess file via FTP and ensure it has the correct permissions. Clearing your cache, updating your site, and checking for SSL issues can also help.

How do I enable permalinks in WordPress?

To enable permalinks in WordPress, log in to your dashboard and go to Settings > Permalinks. Choose your desired permalink structure from the options provided, like Post name or Day and name. Click the Save Changes button at the bottom. This will activate the new permalink settings for your site. Make sure your .htaccess file is writable, as WordPress needs this to save the changes.

Do permalinks expire?

No, permalinks do not expire. Once set, they remain active until you change them. However, changes to your site’s settings, plugins, or structure can affect how permalinks work. Regularly check your site’s setup to ensure permalinks function properly.

Why is my WordPress link not working?

Your WordPress link might not work due to several issues. It could be because of a permalink setting problem. Conflicts with plugins or themes might also be the cause. Other reasons include a broken .htaccess file or caching issues. Make sure to check recent changes to your site or any updates that might have affected the links.

Category:

You may also like


WordPress Site Not Loading: 7 Easy Fixes
WordPress Site Not Loading: 7 Easy Fixes

You’ve probably experienced a small business’s website crashing during a Black Friday sale. Eager shoppers flood the site all at once causing it to become unresponsive. This is one of…

Solve: The Site Is Experiencing Technical Difficulties
Solve: The Site Is Experiencing Technical Difficulties

“The site is experiencing technical difficulties” error can feel frustrating. Just when you’re about to update a plugin or upgrade your PHP, this pesky problem appears. And sometimes, it locks…

How can we help you?

If you’re worried that your website has been hacked, MalCare can help you quickly fix the issue and secure your site to prevent future hacks.

My site is hacked – Help me clean it

Clean your site with MalCare’s AntiVirus solution within minutes. It will remove all malware from your complete site. Guaranteed.

Secure my WordPress Site from hackers

MalCare’s 7-Layer Security Offers Complete Protection for Your Website. 300,000+ Websites Trust MalCare for Total Defence from Attacks.