Fix WordPress Permalinks Not Working

How to Fix WordPress Permalinks Not Working? Step by Step

How to Fix WordPress Permalinks Not Working? Step by Step – How do you get WordPress permalinks to work properly? Many official information on permalinks are rather technical and, unfortunately, rather dispersive: they don’t take into account the real needs of bloggers and webmasters, and for this reason many of us often don’t know how to intervene even on something as simple as permalinks.

How to Fix WordPress Permalinks Not Working? Step by Step

Why aren’t permalinks working?

In general, if the permalinks fail to work on our site it may depend on a mix of factors : the most common causes of error are generally 1) an error in the site’s .htaccess file (make a local copy of this file immediately : you will probably have to delete and restore it) 2) an error in the tag syntax.

We will look at these two points, below, separately.

Restore the WordPress .htaccess file

Save yourself a copy of your htaccess, to be restored quickly in case of emergency, and delete it completely: in this way you will be sure that you have eliminated any directives that could cause problems to your permalinks. Remember that the htaccess file expresses directives for the server, which are quite technically complex and which serve to give the conditions for the permalinks to work: it is not enough to set up the htaccess file correctly, therefore, but you must associate the correct setting of the directives also the setting of WordPress (therefore of PHP).

After deleting all the old htaccess file (remember to make a backup!) insert, i.e. copy-paste, this type of standard WordPress directives:

# 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]
# END WordPress

These are the standard WordPress directives for Apache, the most popular web server, and you can save them as a valid standard for most sites and real cases. What are we telling our site server, essentially? We are telling him that first of all he must activate mod_rewrite, which is essential for any permalink to work that is not “ Simple“. 

Secondly, we are providing the correct directives so that it can associate the actual URL with the virtual one we are going to create, i.e. the transparent “passage” or “translation” between URLs of the type – test towards my (where 123 will be the ID of the article in question). Without going into the merits of the individual directives (which I have analyzed here), those seen and reported above serve to restore a standard situation.

Once uploaded and updated on the site via FTP, what remains to be done is simple: you need to go to Settings and then click on Permalinks, from the administration menu of our site, and set one of the SEO friendly URLs we need. For example, for this site I decided to set ” Month and name “, so I selected the corresponding line and then clicked on ” Save changes ” at the bottom.

How WordPress Permalinks Work: Tags

Normally, a permalink tag error could generate a 500 error ; to solve it, the suggestion is to deactivate all the unnecessary, reset the htaccess file as seen previously and if necessary temporarily deactivate both plugin and theme.

Below I have tried to summarize the essentials about WordPress permalink tags.

“simple” format. This format is the standard one of the site: very convenient, in my opinion, only in the development or configuration phase of the site, or in the event of a conflict with certain WordPress plugins or components. Unless you have excellent reasons to keep it, therefore, it remains an inadvisable choice in the release phase, that is, when you publish and bring visits to your site.

SEO friendly format. In this case you can either select one of the default choices, or you can select the last one and enter free text. Obviously you will need to enter a format that is consistent with the most common tag standards that are available for WordPress.

Typically WP tags are written as %name_tag%, so they start and end with a percent character (%); therefore remember that this is a delicate section that affects your site globally, be very careful to insert them exactly as they are shown,

Because an error in the copy-paste phase could cost you a malfunction on your entire site .%year%indicates the year the post was published%monthnum%indicates the month of publication of the post%day%indicates the day of publication of the post%hour%indicates the time of publication of the post%minute%indicates the minute of publication of the post%second%indicates the second of publication of the post%post_id%indicates the ID, i.e. the integer that uniquely identifies the post%postname%it is the sanitized version , i.e. filtered and stripped of characters that could be problematic in the URL rendering phase, of the post title: it can be freely edited for each individual article%category%Allows you to enter the category of the article in the URL, again in the sanitized version .%author%Who wouldn’t want the author’s name in the article? I can’t imagine a circumstance in which it would make sense, however this possibility exists as well.

Read Also: How to Find and Fix Broken links on Your Website

Some SEO tips for writing and determining good permalink structures:

  1. insert the date in the URL only if the time element is important for the site (eg news site);
  2. entering the post_id of articles is a safe way , in many cases, to generate unique and distinguishable URLs (not the most user-friendly method, however);
  3. enter only the name of the undated post if the date is not essential (tutorial site, for example) – warning: hiding a data from the URL is not the same as hiding it from Google!
  4. enter the category if you believe that the name of the category is important for making the user understand the content of the article;
  5. remember that it is not possible (and it would not be convenient anyway, when you think about it) to insert tags in permalinks, in general; do not confuse the use of categories with that of tags, in fact the former divide the latter unite the topics of your site;
  6. for everything else there are no a priori rules: everything depends on your expertise and ability to highlight the right elements for users and search engines ( source ).

Example of using WordPress permalinks

For example, if we title an article ” A thousand ways to haul the mainsail ” an SEO-friendly URL will be like this:

Leave a Comment

Your email address will not be published. Required fields are marked *