ZebluePrime Gets New Digs!!!
So ZebluePrime got new digs last night…….errr maybe he just washed them really! I helped him setup his own domain (zeblueprime.com) to get him off of a sub-domain i let him borrow (previously evan.phenixblue.com). Along with the domain setup there were a few changes to make within his wordpress install to make everything go smooth.
I try to keep a directory structure similar to this within my webroot:
WEBROOT/
/domain1.com
/domain2.com
/domain2.com/sub1.domain.com
/domain2.com/sub2.domain.com
/*********************DISCLAIMER***********************************/
PLEASE BACKUP YOUR DATABASE AND FILES BEFORE PERFORMING ANY OF THE FOLLOWING!!!
Step 1: Migrate files from old sub-domain to new domain directory
- Create new directory
#sudo mkdir /WEBROOT/zeblueprime.com- Change to old directory
#cd /WEBROOT/phenixblue.com/evan.phenixblue.com/- Copy files from old dir to new dir
#sudo cp -R * ../../zeblueprime.com/- Change to new directory, verify your files (including .htaccess) exist, and have proper permissions and ownership
#cd ../../zeblueprime.com/
#ls -laNOTE: I also moved Zeblue to a new MySQL DB to keep up with the naming conventions I use for DB’s (Migrating to a new DB is outside of the scope of this post)
Step 2: Update url information within the Database (all DB edits performed via phpMyAdmin)
- Update Site and Blog URL
Within the “wp_options” table, change the “option_values” for the following “option_name” rows
“siteurl” - change to: http://zeblueprime.com/
“home” – change to: http://zeblueprime.com/
- Update file upload url
Within the “wp_options” table, change the following “option_value” where “option_name” is “upload_path” to
/WEBROOT/zeblue.com/wp/wp-content/uploads
- Update Post URL’s
Run the following SQL
UPDATE wp_posts SET guid = REPLACE ( guid, 'http://evan.phenixblue.com', 'http://zeblueprime.com');
- Update URL’s within your Post’s content
Run the following SQL
UPDATE wp_posts SET post_content = REPLACE ( post_content, 'http://evan.phenixblue.com', 'http://zeblueprime.com');
Step 3: Verify your site works
Navigate to your site in a web browser and verify your page. post, tag, category, etc. links work (I normally test a few, and then assume they all work!). Also log into the admin interface and navigate through a few menus.
This should conclude all of the required modifications to change the domain of your WP install. This is by no means the only way to do it, just the way I chose to. You can also check out the Wordpress Codex for other options.
P.S. I typed up all of this after the fact, so some of the commands may not be perfect, and there’s the slight chance I may have skipped a step, but most will be able read between the lines!
-Phenix
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.




Comments
// Begin Comments & Trackbacks ?>No comments yet.
Leave a comment