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

#sudo mkdir /WEBROOT/zeblueprime.com

#cd /WEBROOT/phenixblue.com/evan.phenixblue.com/

#sudo cp -R  * ../../zeblueprime.com/

#cd ../../zeblueprime.com/

#ls -la

NOTE: 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)

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/

Within the “wp_options” table, change the following “option_value” where “option_name” is “upload_path” to

/WEBROOT/zeblue.com/wp/wp-content/uploads

Run the following SQL

UPDATE wp_posts SET guid = REPLACE (
guid,
'http://evan.phenixblue.com',
'http://zeblueprime.com');

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

  • Share/Bookmark

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

No comments yet.

Leave a comment

(required)

(required)