How to Change WordPress Permalinks Structure The Right Way

Want to change WordPress permalinks structure? It can lead to 404 errors and huge SEO challenges if not done the right way. However, it is clear that if you have a date-based URL structure which includes the year, month or day and your content continues to get outdated, then it would receive much less search engine traffic as Google continues to display dates in search results.

Why Remove Date from Permalinks?

Why get date-based URLs anyway? Many bloggers start with the date based URL structure which includes the year, month or even day in the URL. This was a typical problem for bloggers migrating from Google Blogger to WordPress. Since Blogger had date-based URLs, it seemed natural to move to date based WordPress permalinks. We also did the same mistake when we moved from Blogspot to WordPress in 2006!

As your blog gets popular, it becomes more and more difficult to change the permalink structure, with high risk to search engine organic traffic loss. Moreover, WordPress being a blog software by nature, starts with a date based permalinks structure by default, as blogs typically have dated content.

Dates in search results – The problem starts when your content starts getting old and outdated! Google and other search engines include the date in the breadcrumbs which the show on top of your search results.

permalink dates

Do people really want to see a result which is over 10 years old! Therefore outdated content will have very low CTR because the dates will make your content non-attractive and irrelevant, however good your content might be.

Dangers of Changing WordPress Permalinks

Remember that changing the permalink structure will affect your entire site post pages. It can be a huge SEO issue if not managed properly. Mostly it is not recommended to change the entire site link structure for established websites. If you have a small new website, it is less of an issue.

Why not simply change the post date? The big problem is that if you change the date, the permalink also changes and that breaks the URL and causes 404 errors. Thus, it becomes impossible to change dates without changing the URL and this is a huge limitation if you want to update the date and content. Of course, you can show updated date in posts, but changing the actual date is not possible.

Lost Social Media Influence – Another huge disadvantage of changing link structure is all social media influence on these posts like Facebook likes, tweets etc. will no longer count for these new urls. Considering that social media factors hugely affect the SEO, you need to also watch for this.

So here are the 3 easy steps in which we do it.

1. Change WordPress Permalinks Settings

The first step basically involves to go through the WordPress admin and change the permalinks to the post name option. If you check out the Google search results of most sites you will find that post name is the most common option used by a majority of WordPress bloggers.

Go to WordPress Admin > Settings > Permalinks

wordpress permalinks

Note the warning on top of the page and you really should know what you are doing.

Changing your permalinks settings can seriously impact your search engine visibility. It should almost never be done on a live website.

Simply changing the option will immediately lead to a complete change of all post permalinks / URLs on your site and all the posts with old date format URLs will cause 404 errors. Now you will need to direct these old URLs to the new URLs – the old URLs will no longer automatically redirect to the new shorter post name URL format.

2. Create 301 Redirects in Htaccess to Prevent  404 Errors

You now will need to add some magic code to the .htaccess file which can use the RedirectMatch attribute to automatically allow your server to 301 redirects all these earlier URLs to the new URL.

I personally tried a lot of different redirect codes in .htaccess and some did partially work. But what really worked for me is this nifty redirect helper tool by Yoast which takes ample consideration of all your different blog settings like https, WP in subfolder, Apache/Nginx server, and previous structure and will generate and the exact code to add to .htaccess file which will allow instant 301 permanent redirects from the old URL to the new URL.

create redirects

The .htaccess file is located in the public_html folder on your web server and can be easily accessed from the file manager in cPanel or via FTP. Do remember to keep .htaccess backup before editing the file as code errors can bring your site down.

3. Find 404 Errors and Redirect Links

The redirection plugin is a very useful plugin to track all the 404 errors which have started to happen from broken URLs which might be caused by the new URL structure. It will help you easily detect which URLs are getting broken because of a natural or duplicate URL and you can easily redirect them in one click.

redirect 404 errors

4. Fix Internal Link Redirects

Now there must be thousands of internal links that interconnect your site with the targeted keywords. All those links have now started to redirect to the new URLs and are not broken. But why create unnecessary redirects when you know they will lose some link juice.

Broken Link Checker is an awesome power tool that will scan all redirects on your sites quickly and list them in a neat actionable format. Obviously it might detect thousands of such redirects when you run it the first time on an old site. So you can filter the required domain name links an get the target links you need to update from your own domain name. Rest you can fix later and you should for a clean link flow.

search redirects

After you get the long list of these internal domain redirects, simply click the check boxes or bulk select the URLs and click ‘Fix Redirects‘ and it is all done in one click. There might be thousands of links and its better to do it page wise in batches to prevent server load and database table crashes.

fix redirects

So now you are done. We took this leap after 15 years! Let’s see how it goes.

Warning – Kindly remember your search engine traffic can be very adversely affected by changing permalinks and generally it is NOT recommended. Please do at your own risk and it is always better to consult a SEO expert before doing this. We cannot provide any kind of support or advice on this.

Did you change your permalink structure after a long time … Please share your experience in comments.

Share with friends

About the Author: P Chandra is editor of QOT, one of India's earliest tech bloggers since 2004. A tech enthusiast with expertise in coding, WordPress, web tools, SEO and DIY hacks.