Copy your test site to a live site (GUI)

Last updated on
18 August 2016

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

TIP: Make sure your test site is a recent copy of your live site, otherwise you will lose changes. It might be a good idea to create a new test site if it has been a while.

I. Backup Your Test Site Files
Using an FTP client such as SmartFTP, download all your existing test site files to your hard drive. The especially important files to keep track of are settings.php, and .htaccess.

II. Change settings.php in your test site Drupal files
Open and edit the file located under sites/default/settings.php (or includes/conf.php) with a plain text editor such as jEdit. Follow the directions in the file and modify this setting:

$base_url = 'http://www.example.com/';

(This is the address where you will upload your live site directory. This tells Drupal where to look for the Drupal files to connect with.)

There is no need to change the database settings. Just take note that your test site database is now being used as the live site database.

III. Upload the test site Drupal files to your live site directory
Using an FTP client such as SmartFTP,

  1. Download all your live site files to a backup folder on your desktop.
  2. Delete all your live site files on your server. You made a backup, right?
  3. Upload all the test site files to the directory:
    http://www.example.com/

    In FTP world this is usually seen as "public_html/" or "www/".

IV. Check if your test site works
Navigate to http://www.example.com/ and you should see your newly upgraded Drupal site.

Some more suggestions:

  • .htaccess may need to be changed too

If you uncommented the following line in your .htaccess file in order to get rewrite rules to work properly with a subdirectory for your test site, you may need to re-comment it.

from:

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /drupal

to:

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
# RewriteBase /drupal

Note:

Once you have copied your test site to your live site and are using your test database as your live database, make sure that you create a new test copy of your live database when you create a new test site!. Do not use your live database with your test site or you risk corrupting and losing your live data!

Help improve this page

Page status: No known problems

You can: