1. Make a subdomain of your main domain.
2. Export database of live site and save it.
3. Create a new database and database user.
4. Restore/Import the backup/exported database sql file to the newly created database.
5. Change all URL reference to your live site to the new subdomain URL by sql query (check this link on how to do that).
6. Copy (not Move) over the files from your live site to your subdomain folder.
7. Edit the wp-config.php
, replace DB_NAME
, DB_USER
, DB_PASSWORD
(maybe also your Authentication Unique Keys). Then save the file.
8. Visit your subdomain’s URL and finish the WordPress installation. (Create admin user, site name, etc.)
9. Login to admin panel, go to Settings > Privacy
and tick “I would like to block search engines, but allow normal visitors” radio button. If you want, you can also add robots.txt in the root folder disallowing all spiders on your subdomain folder.
10. Done! That is, if I haven’t missed a step. Lol.