Categories
Blog Tutorials

Why are my Permalinks not Working on WordPress

Are your permalinks not working on your WordPress website?

There can be quite a few issues, which you may be having on your website, and in this tutorial, we will explain to you how to fix them.

What is WordPress Permalinks

WordPress permalinks are URLs that are generated when creating a post, page, or product.

Each page, post, product, etc on your website is associated with a unique permalink for you and your visitors to access.

The permalinks on WordPress can be updated with or without plugins, and also edited the way you like.

Some people prefer using WordPress SEO plugins to automatically set the permalinks and titles of their pages, so they can be automatically set.

The lines for your titles and permalinks are pretty short.

You cannot choose exactly how they will look, but you can add certain things to them, such as an updateable year, website name, special symbols, and others.

Good vs bad WordPress Permalinks

The way permalinks are usually generated is 2 ways.

Static websites usually generate their permalinks in the following way:

https://example.com/path/to/resource/wordpress-permalinks.html

These URLs are easy to read by the search bots and can be easily remembered by your visitors. We call them SEO-friendly URLs.

You will often receive URLs when you create blog posts or pages, which will have content. They are kept the same when different visitors come to your website.

Static URLs can be manually edited to fit the website needs of every website owner and be used for optimization purposes.

The next set of URLs is the bad ones or the so-called dynamic URLs. If you have an e-commerce store or Apache-hosted website, your URLs may look in the following way:

https://example.com/path/to/resource/wordpress-permalinks.html

These types of dynamic URLs can hardly be read by the search bots and give you good ranking results.

They can change with any given request and are widely seen when purchasing a product with Woocommerce.

Nonetheless, some e-commerce products are automatically set with a dynamic URL and will need a good static URL with shortening, so it can fit the requirements of the search engines.

Why are my permalinks not working – common reasons

When you are starting your WordPress journey it’s a bad sign to see your permalinks broken. There are many reasons for a permalink not to be working, and we will list the different possibilities.

Redirections set from a WordPress plugin

If you are using a WordPress plugin, such as Rankmath or something else for redirecting URLs, you may have configured it to redirect all permalinks to a certain one.

Redirections are widely used to avoid broken pages and maintain a good visitor flow on websites.

A common misunderstanding is where and how to redirect any broken URLs when they occur on our website.

WordPress plugins interfering with permalinks

If you have downloaded a new plugin on your site, which allows you to edit or set permalinks on WordPress, it may interfere with the original structure.

In some cases, plugins are not compatible anymore with the newest WordPress updates and cause 404 errors to be seen around the pages.

In other cases, you may have 2 plugins, which are doing the same work, and interfere with each other’s work.

WordPress advanced field plugins usually have permalinks editing options, so you will not need a separate plugin to do the work.

Plugin updates interfering with WordPress permalinks

Sometimes when you update your plugins, the existing WordPress permalinks can become corrupted and result in broken pages.

Once in a while, the developers release a plugin update, which interferes with another theme or plugin and gets your website’s permalinks destroyed.

Corrupted backup file for WordPress

There are so many WordPress plugins for backups, that can always help you to save your website in case of an emergency.

These plugins can be used to create backups at a set time every day, or week.

Sometimes these plugins create a corrupted backup file for your WordPress website due to a mistake or when you download a locally hosted website.

Corrupted htaccess in WordPress

Htaccess is the core of WordPress. Without it, all of your plugins, themes, cron jobs, and others will not properly function.

If you have no coding knowledge or understanding of how it works, editing it may result in corrupting your htaccess file.

When you have a corrupt htaccess file, your website and its permalinks will not be functioning properly anymore.

In some cases, you are even prevented from logging in to your WordPress website.

7 ways to fix permalinks that are not working on WordPress

Fixing your broken permalinks can be an easy and pretty much straightforward job, which requires no techie knowledge, as we will lay the groundwork for you.

Making sure you can get in touch with your hosting provider, in case of an emergency is very important before starting.

Re-installing your WordPress website

If your website is brand new and you have not imported or tried any backups already, you can simply delete the installation from your Softuculous installer.

Once the WordPress website is deleted, you can once again re-install it.

Make sure you are using the correct directory, as sometimes they result in broken permalinks in WordPress.

Restore the Permalinks from inside WordPress

A common reason for permalinks not to work on WordPress is that the code broke and you will need to restore your permalinks.

To fix this issue, you will need your admin credentials to log in to your WordPress website.

Once you have accessed the dashboard, you can go to the WordPress settings category and choose permalinks.

The structure of your permalinks does not really matter. The main idea is to choose anything besides the one that was chosen before.

Once you have chosen the permalinks structure, or have created your custom one, you can go ahead and save your changes.

If you notice changes in every post or page you visit on your website’s URL addresses, then you can safely revert back to your previous structure.

Disable all WordPress plugins

In some cases, WordPress plugins may cause interference with another active one.

To find out if your plugins are causing issues with your WordPress website’s permalinks, you can simply go to the plugins tab and view all of your plugins.

Disable all of the plugins at once, and check if your website’s permalinks started behaving normally.

If the permalinks are working, you can then start turning on each WordPress plugin and test once again.

Once you find out the culprit, you can leave it alone working and keep testing if another plugin is interfering with it, or if it’s just the new update.

If the plugin version is the cause of your issue, you can simply use a plugin, such as WP-Rollback or any other, which can revert the plugin’s version to a previous one.

Change your WordPress theme

WordPress themes have in-built features. Sometimes they may let us choose a permalink structure or create a custom one for ourselves.

Even though it sounds too good and can ease up your work, things may end up in the opposite direction.

To find out if your WordPress theme is the evil doer, you will need to download and install another theme, or try out the default ones and see if your permalinks are working.

If the problem exists in your current WordPress theme, you can try using any of these free and premium WordPress themes as they have solid support behind them and no issues.

Perform a full site backup from your hosting provider

Sometimes your WordPress backup plugin may not be doing a great job for your website.

There are multiple cases where a single backup crashes a whole website and that’s one of the reasons your permalinks may not be working on WordPress.

But since a backup from your plugin cannot help you revert to a previous update, how can you fix your permalinks issue?

The answer is your hosting provider.

Depending on the hosting company you have chosen for your website, you receive a certain amount of backups.

Each website has its own panel and tools for creating backups, that can be accessed by the default users or your hosting’s support.

If you are unsure how to backup your website via your hosting provider, it is best to speak directly to them and ask if they can do this for you.

Replace your htaccess file with a new one

Sometimes the WordPress htaccess file can get corrupted due to manual edits or from other WordPress plugins, which edit it directly.

The process to fix your htaccess file is pretty much straightforward and will require no more than 2 minutes of your time.

All you need is your WordPress hosting account credentials and access.

You don’t need any FTP accounts as nowadays most hosting providers let you edit everything from your hosting panel.

Log in to your hosting panel and search for the public_html folder, which holds the htaccess file.

Rename this file to anything you want, but make it easy to memorize. It is not very important to keep it, as it is probably corrupted, so you can delete it if needed.

Make sure to keep the name and extension of your htaccess file and recreate it.

Once the file has been created, you can right-click and edit it. Paste the following lines of code, and you will have a new and fully functional 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

Resetting your Nginx or Apache files

Most hosting providers offer Apache and Nginx hosting plans for their clients. Apache is still widely preferred and used, even though better technology exists.

If your hosting plan offers any of these, you can simply talk with your hosting provider to reset them for you.