Copy your live site to a test site (GUI)
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
Before you begin, decide where the new installation will be located. Usually you can just install Drupal to a subdirectory: example.com/test_site/.
Make sure you have already completed the steps for backing up your site.
I. Setup a test-site database with phpMyAdmin
- Create a new database "test_site_db"

- Select the database from the dropdown box on the left

- Click the "Import" tab

- Upload the backed-up SQL script file you just saved by clicking the "Browse" button and selecting it. It should have the extension .sql.

- Hit the "GO" button to upload the .sql script and execute it

II. Change settings.php (or includes/conf.php) in your backed-up 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 these three settings:
$db_url = mysql://user:pass@localhost/test_site_db';(test-site database login & password, URL location of the test-site database. "localhost" usually works by default.)
$base_url = 'http://www.example.com/test_site';(This is where you want to move Drupal. You can install Drupal to a subdirectory such as
http://www.example.com/test-site. This is what we want.)$db_prefix = '';(Sometimes your database tables will have a prefix. Ask your webhosting company for help if you think this is causing a problem. Otherwise leave it blank.
III. Upload the backed-up Drupal files to a test-site folder on your server
- First, create the subfolder "test_site" first. Right-click in SmartFTP and click "New"...."Folder". Other FTP clients may have slightly different methods.
- Using an FTP client such as SmartFTP, upload all the backed-up Drupal files to the directory:
http://www.example.com/test_siteIn FTP world this is usually seen as public_html/test_site" or "www/test_site".
IV. Check if your test site works.
Navigate to http://www.example.com/test_site and you should see a working copy of your live site.
V. Get ready for the basic steps.The basic steps will repeat some of the work you just did such as backing up your live site and database. You can skip those steps in the basic steps instructions.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion