Changing Directory
This support request was posted in General Support by krisjolls
- krisjolls March 18, 2013 at 1:15 am
This is my first WP site for a customer. I placed it in a TEMP directory as to not have to shut down his current site. Halfway through I’m wondering what kind of problems I might have when it comes time to remove it from the temp directory into the main one. Links, images etc.
Any support or suggestions about this method would be helpful especially if I need to stop what I’m doing now.
Thanks.
I’m working in the BBQ theme.
Juanfra Aldasoro March 18, 2013 at 1:46 pmHello There,
Thanks for writing and welcome to the WP world 🙂
You can work the way you’re doing it right now, there’s no problem with that. Then you can update the URL, move the files and run a few lines of SQL to fix the database.
When updating the location you’ll need to update the values in the database that have the “old” location. That can be solved with a few lines of SQL.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
Replace old-domain.com and new-domain.com with your locations.
With regards to files, you only have to move them from /temp/ to the upper level.
Best,
Juan.krisjolls March 18, 2013 at 8:10 pmGreat. Good news. Thanks for the help. Ill go ahead and close this thread and opens new one when the time comes if I need more help. You have a great theme and great support. Thanks again.
This topic is marked as resolved
Only the topic author can re-open this thread.