visual-wordpress In our last post, we discussed that how you can make a clone of the live location for WordPress Design & Development and in this post we’ll share that how you can bring back the newly developed theme back to the live location.

This process requires some work because at the time of making the test location live, the live location would already have new content. So, its important to ensure that every thing goes live with the updated content. Well, the pain is far less as compared to fixing the bugs in live environment of high traffic blogs. Lets check out the process that we follow at Blog Design Studio to make the test locations live -

Purpose

We want to make the test location (the one we created using the cloning document), go live!

Pre-requisites

  • SSH enabled FTP account. SSH is secure shell that gives access to the linux servers thus making the process a little technical but fast, secure and we face less issues.
  • Domain name access
  • Web host control panel access for access to database.
  • Putty – Windows based software to access SSH. Download here. [choose A Windows Installer]
  • FileZilla – FTP software | Download here.

Example settings

  1. FTP account with ssh
    1. Username: bdstest
    2. Password: bdstest123456
    3. Public folder location – /public_html/
    4. Test folder location – /public_html/test/
  2. CPanel account details
    1. Domain name: http://bdstest.com
    2. Server IP : 202.143.12.34 {this is made up}
    3. CPanel URL: http://202.143.12.34/cpanel/ [not every webhost comes with CPanel, some come with their own control panel – so you’ll have to follow the instructions accordingly or contact web host.
    4. Username : bdscpanel
    5. Password: bdscpanel123

Pointers –

SSH commands are in Italics

Process to follow

  1. Put the site in maintenance mode (if required).
  2. Upgrade WordPress version of the live location
  3. Export the new content (if any).
  4. Import the content in test location (that we are going to make live)
  5. Make the backup of files on test location
  6. Change the URL structure of the new database (i.e. the one we created in the previous documentation)
  7. Extract the backup files of test location at original location
  8. Disable test location

Process Starts

1. Put the site in maintenance mode: The site should be put in maintenance mode to ensure that if the theme breaks because of the next step (upgrading WordPress) then users will not experience any issues. For this install maintenance mode plugin  and activate it.

2. Upgrade WordPress of Live Location: It’s helpful in exporting the content easily.

  • Go to WordPress dashboard·
  • Go to Dashboard->updates
  • Click on Update automatically

3. Export the new content from Live location: In this step we’ll export the content that we’ve put in the new user that we created in the 9th step of previous document.

  • Go to WordPress dashboard of Live location
  • Go to Tools->Export
  • Under Filters, select the new user that we created in last documentation
  • Click Download Export File, save it somewhere on your hard drive.

4. Import the content in Test Location: In this step we’ll import the content to the test location.

  • Go to WordPress dashboard of Live location
  • Go to Tools->Import
  • Select WordPress out of all the options. If it asks you to install the plugin, then do so.
  • Select Activate & Run Importer (if the installation happens) , else it’ll take you directly to importer.
  • Select the exported file and then upload and import.

5. Make the backup of files on test location:

  • Open Putty [enter the ip address of server or domain name at the place shown in picture 1] & click Open
  • Enter the SSH enabled username & password.
  • ls {lists the files & folders}
  • cd /public_html/test/ {change directory from existing to /public_html/test/}
  • tar -cvf testcontent.tar ./ (this will ensure that all the files in the folder gets packed in a file called testcontent.tar)
  • mv testcontent.tar /public_html (if you have troubles in doing so, then simply use filezilla to move the file to public_html folder via simple drag and drop)
  • Keep the putty window open.

6. Change the URL Structure of the database: Since the database we are using has the URL structure of Test location, so we need to change it back to the live location.

  • Go to phpMyAdmin
  • Select the new location database
  • go to SQL tab and run these sql queries one by one –
    • 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.olddomain.com’,'http://www.newdomain.com’);
    • UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.old-domain.com’, ‘http://www.new-domain.com’);

Note: if you are making the clone in a sub-folder then then URL in the queries should be like this – http://www.new-domain.com/subfolder [there should be no trailing slash at the end]. In our example old domain will be http://bdstest.com/test & the new domain will be http://bdstest.com

7. Extract the test locations’ backup at original location: Since all the changes have been made, by just extracting the files will ensure that the maintenance mode will get deactivated and the new design will get live as well!

  • Switch back to Putty window and type the following commands.
  • Cd .. (this will bring you back to /public_html/ folder)
  • tar –xvf testcontent.tar (this will ensure that all the files will be merged that were added later in the live site so, you’ll not miss a single thing!)
  • keep the window open for the next step

8. Disable Test location: We’ll disable to test location to ensure that it doesn’t get crawled by search engines. Although, the files in the test location aren’t required, still it doesn’t hurt to keep the folder, it can come handy in odd situations.

  • cd test
  • rm wp-config.php

Congrats! The Site is Live!!! Now, go ahead and start testing to ensure that everything is correct and that there are no bugs left.

4 Comment

Featured Designs

Parent Society

Parent Society

Marijuana Maps

Marijuana Maps

Cake Journal

Cake Journal

CopyKat Recipes

CopyKat Recipes

Jessica Denay

Jessica Denay

Keith Ferrazzi

Keith Ferrazzi

Rennaissance Yoga

Rennaissance Yoga

Brink Zone

Brink Zone

Illustrious Author

Illustrious Author

Boca Care

Boca Care

KingsCast

Kingscast

Notecook

Note Cook

My Business Musings

My Business Musings

4 Responses so far | Have Your Say!

  1. Ken Boer

    You mention your last post. What is the link to that?

  2. Ken Boer

    Never mind, I found it.

  3. Ken Boer

    You suggest writing new posts under a new user name, so that they can be easily exported and added to the one that has been newly developed. Any suggestions, however, for comments that are made not on new posts but old posts? Any way to transfer those over?

    Thanks for your help.

Trackbacks/Pingbacks