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');
OTHER ARTICLES YOU MAY LIKE
BUGS IN TIKTOK WEB APP
In this article, I will discuss the bugs I have encountered while using the Tik Tok web app. When using the TikTok web app, I encountered a frustrating issue where I was unable to follow back users. This problem has persisted, leaving me with zero following despite my efforts to engage with the platform. As […]
read moreTHE BEST WOOCOMMERCE AFFILIATE AFFILIATE RETAILER PLUGIN FOR MAXIMUM PROFITS
In today’s highly competitive e-commerce landscape, leveraging the power of affiliate marketing has become a crucial strategy for online retailers to maximize their profits. And when it comes to running an efficient and lucrative affiliate program on your WooCommerce store, choosing the right plugin is paramount. The best WooCommerce affiliate retailer plugin that stands out […]
read more