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

Skriv en kommentar

Din e-mailadresse vil ikke blive publiceret.