5 Ways to Change WordPress Permalinks Safely

Have you ever opened a link to a website that says “404 Page Not Found” ? Well, it could be that this link is broken so we can't access the link. If this is the case, we who visit the website will feel annoyed and the website owner will feel panic because it cannot be accessed..

A broken Permalink can affect website traffic. Not only does it interfere with the comfort of visitors who access, but it also has an impact on the number of visitors to the website.

But usually it's only certain links that are inaccessible, not the main website. If this is the case, it means that the permalink is broken and needs to be replaced so that it can be accessed again. This might happen because there are changes made by the website owner that cause permalink errors.

How to replace the permalink structure safely?

Before you make any changes to your website's link structure, it's important to know about permalinks. Some people may think that it's easy to change permalinks. But the actual act of changing permalinks has consequences and must be planned before changing it.

In general, the Post Name option is the ideal structure for most website users. This Post Name structure is good for all websites even if they are news-related websites that usually want to include dates in the permalink.

If you are using WordPress, you should click Settings > Permalinks in the WordPress dashboard. By default, WordPress permalinks use the day and name option.

If you want to focus on the content to be posted rather than the posting date, you can use the post name option. This option will focus more on the keywords used. While the other option date followed by the post name where usually websites that focus on news where the date becomes a component in the permalink structure.

But if you want to change your permalink, there are some tutorials you can apply that are safe to do.

Step 1 : Changing Permalink Structure in WordPress

The simplest way is to rearrange the permalink structure in WordPress. The methods are as follows :

  1. Login to Dashboard WordPress
  2. Click Settings > Permalinks
  3. Change the permalink settings as you wish.

Suppose you are currently using the day and name permalink structure and want to change the structure so that the day is not included, then choose the post name. For example, as shown below.

  1. After defining and changing it, don't forget to click save changes.
  2. Don't forget, after saving the changes, you need to check the permalink you have changed by clicking preview post.

Your Permalink is now up to date! This will automatically update all internal URLs in your WordPress with the new syntax.

If the permalink is still broken, you can use the next tutorial to solve your problem.

Step 2 : Disabling Plugins

As mentioned above, permalinks can be broken when we install new plugins. These new plugins can cause damage to the URL structure in WordPress. Deactivating the plugin can restore the broken permalinks.

Here are the ways that can be done to deactivate plugins that you can do:

  1. Login to dashboard WordPress
  2. Click menu Plugins > Installed Plugin
  3. Deactivate one of the plugins installed in WordPress by clicking deactivate. 


It's a good idea to deactivate recent or newly installed plugins to find out which ones are causing the permalink to break.

  1. Click save changes to save your changes
  2. Re-access the page or permalink that was in error.
  3. If it's no longer an error, the problematic trigger plugin has been resolved. But if the error persists, please follow these steps to find the problematic plugin so that the page can be accessed again.

If you've found a plugin with a problem, it's best to contact the developer or community forum so that the plugin can be fixed to find the root cause.

Step 3 : Replacing File .htaccess

If the above two steps still don't fix the permalink crash, the problem may be with your .htaccess file configuration. Therefore, you need to replace the .htaccess file with the default one from WordPress.

# 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

To fix this, please follow the tutorial below

  1. Buka cPanel > File Manager
  2. Go to the main WordPress folder
  3. After that, right-click on the .htaccess file and rename it
  4. Rename it with a different name, for example:.htaccess1. The point is that this file is disabled
  5. Then, create a new file with the name .htaccess by clicking the +file button in the upper left corner. A new file column will appear then fill in the new file name column with .htacess then click the create new file button.
  6. Edit the .htaccess file that you just created. After that, copy the default script of the .htaccess file listed. Don't forget to click save.
  7. If you have clicked save, try testing by accessing the URL or permalink that is in error or cannot be accessed.

Step 4: Fixing Broken Links With 301 Redirect

There is a simple solution to this problem and that is to set up with redirects or 301 redirects on the website. A 301 redirect basically tells the browser about something coming to your website using the old permalink structured URL where the relevant content is located.

This lets search engines know that this is a permanent change. You may also want to customize the 404 page not found page to catch broken internal or manual links.

This step can be used by using the 301 redirect plugin. To create a redirect in WordPress, one of the plugin options used is Simple 301 Redirects

The trick is that you need to install and activate the Simple 301 Redirects plugin. Once you have done so, the plugin will automatically be available in the new menu to the Settings area of the WordPress dashboard.

On the settings page, there will be two fields. One labeled Request and another labeled Destination These two are basically where you enter the old permalink structure and the new permalink structure. You just need to add the information after your domain name to these fields.

For example, in the Request column is the configuration for Month and Name permalinks that are broken or inaccessible. While in the Destination column is the WordPress configuration for the name post permalink structure where this permalink is accessible. After adding these two fields, save your changes and click save changes.

By using redirect 301, search engines that enter the old link will go to the new link (destination) that you have added.

Step 5: Change Search Engine Links to New Structure (Re-indexing)

If there are still errors or inaccessibility, it is possible that the search engine has incorrect information after you update the permalink structure. Search engines automatically crawl websites on a regular basis and update when they find changes so this problem will resolve itself.

However, you can help the process by creating an XML Sitemap and then manually re-indexing your website with search engines.

If the error persists, try to remember what changes you made before the error occurred. If permalinks get corrupted while making certain updates on the website, restoring backups can be done so that permalinks can be accessed again.

Conclusion

As we know that when we find a page that says 404 Page Not Found it indicates that something is wrong or broken with the permalink. If the permalink is broken, it will result in website traffic and a decrease in the number of visitors.

Things that trigger broken permalinks are installing new plugins, making updates, migrating websites and changes to the .htaccess file. Aside from broken permalinks, there are a few reasons why you might need to change your permalinks: because you're using an older version of WordPress, to redirect pages and for branding purposes.

There are 5 steps that can be taken to change the permalink structure easily and safely, namely changing the permalink structure in WordPress, deactivating plugins, changing the.htaccess file, fixing broken links with 301 redirects and finally changing search engine links to the new structure (re-indexing).


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.