WordPress problem when moving foldersFebruary 26, 2012 / by Marco / Categories : Technology
I tried moving my WordPress folder to the root of my hosting account and things went pear shaped. After some debugging, I noticed that in the database stored the URL of the website. This meant I had to change most of the data entries in the database. I knew nothing about SQL queries but after some research I managed to find some code that was able to change my domain URL and here it is:
1234567 UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
Limit to 5 sponsors.
OTHER ARTICLES YOU MAY LIKE
Remember the good old days when you could just go to a website and see what all your email addresses were? Those days are gone, unfortunately. One of the biggest problems for businesses and individuals is spam. Spammers send out millions of emails a day, hoping to catch people who are not expecting to receive […]read more
You may have seen the Weather and News widget appear on your Windows 10 taskbar after a recent update and today, I’m going to show you how to hide the Weather and News Widget. The Windows 10 taskbar is the central component of the Windows operating system that shows all the open programs and their […]read more