Going from standard permalinks to %postname% in WordPress

OK. So I began making my wordpress site and spend alot of time changing my old  html site to a wordpress site. I didn’t know that a custom URL, permalink was preferrable over the standard, which is chosen by default when you start making your site in wordpress. So I did the whole site and then wanted to do some SEO. 

Yoast SEO plugin said that I should change from standard permalinks  to be %postname% instead. Ok so I did, but… all my links in the menu etc.  just returned a 404 page not found after doing so and the site was broken completely. Changing back to standard permalinks it worked again.

Ok, I still wanted to change my permalinks to %postname% so I started searching online for solutions and there was a few. They were mostly about changes you could make to the .htaccess file or mod_rewrite. Sort of complecated stuff. I tried some of it, but it did’nt really work for me.

I had also my wordpress site on a local wamp server installation and I discovered that I could change the permalinks there and the site and links still worked and had the right urls displayed. So the problem was basically that my online mySQL server did’nt allow me to rewrite the urls of my pages, but my local mySQL did.

So what I then did was install the plugin “All in One Migrate” on my online WP and backed up my website and downloaded it to my harddrive. Then I installed “All in One Migrate” on my localserver WP and imported the site from the backup file. When that was done I changed the permalinks to %postname% and made a backup of the local WP. Then I removed the website from my online server and made a new Oneclick installation of WP and changed the permalinks on the fresh installation to %postname%, installed the migrate plugin and imported the backup file from the local WP with the changed permalinks and then it just worked.

I did test out stuff along the way to see if it was working before deleting my online wordpress installation. Just to be sure.

Well this is a solution, if you don’t want to mess around with the .htaccess file and mod_rewrite. And ofcourse if google has indexed your stardard permalinks you gonna have to redirect to your new %postname% url, so people won’t get a 404 page when they click to your site from a google link. But theres plenty of articles on the web to help you solve that and also how to install and run a wampserver etc.

Hope this helps somebody  that faces the same problem I did. 

Best regards

Thomas Dichow

Give us a like on FB if you don’t mind 🙂 thanks

4 kommentarer til “Going from standard permalinks to %postname% In WordPress”

  1. Simply desire to say your article is as surprising. The clearness to your post is simply cool and that i could assume you’re an expert on this subject. Fine along with your permission allow me to grasp your RSS feed to stay updated with impending post. Thanks a million and please carry on the gratifying work.

    1. Hi, thanks for you’re comment. I woulden’t say I’m an expert in WordPress, but when I solve a problem, that I can find no answer fore elsewhere, I will make a post to help others solve the problem, much faster and easier. 🙂

  2. Greetings! Very helpful advice within this post! It’s the little changes that make the most significant changes. Thanks a lot for sharing!

Skriv en kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *