WordPress problem when moving folders

February 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:

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');
DO YOU LIKE WHAT YOU'VE READ?
Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!

Our Sponsors

  • Follow us:

OTHER ARTICLES YOU MAY LIKE


BUSINESS DOCUMENT TEMPLATES – CROVE APP

BUSINESS DOCUMENT TEMPLATES – CROVE APP

Are you looking for a business template to use? Did you know there are tools available that allow you to just enter the finer details and you’ll be able to create business documents? Well, Crove App is a SaaS tool that allows your business to quickly create business documents.  Crove App is a cloud-based document […]

read more
AWESOME TOOL FOR REMOTE ACCESS COMPUTERS CALLED GETSCREEN.ME

AWESOME TOOL FOR REMOTE ACCESS COMPUTERS CALLED GETSCREEN.ME

Are you looking for a reliable and secure tool to access remote computers? Look no further than Getscreen.me. This powerful and easy-to-use remote access tool for Windows and Mac provides a fast, secure connection for accessing and controlling virtually any type of device, even if you’re far away. With Getscreen.me, you can connect with any […]

read more

Subscribe

Receive the latest news and awesome deals via email

Like our Page

site auditing tools