How to create dev sites for Magento 1
Learn how to create a Magento 1 dev site on a Nexcess non-cloud server. This guide covers copying files, exporting/importing the database, and updating URLs.
Prerequisites
- A working, preferably current installation of Magento 1
- A Nexcess account on a physical (non-cloud) server and access to SiteWorx; If you use Nexcess Cloud, see instead What are Nexcess Cloud dev sites? for details
- MySQL, or phpMyAdmin access through SiteWorx
- SSH (recommended) or SFTP program
Step by step instructions
- Create the secondary domain to serve as the dev site. For details, refer to How to add secondary domains with SiteWorx.
- Using SSH or SFTP, copy your website files from your PHP installation to your new secondary domain. SSH is the preferred method, as FTP may take considerable time to copy these files. See How to transfer files to a server with SFTP for details.
- Download your live website’s database as a .sql file to your computer. If you are proficient with the command line interface and MySQL, see How to export tables and import MySQL tables via CLI/SSH. If not, use the method provided in How to import and export MySQL databases in SiteWorx.
- Create a new MySQL database, a new user, and to assign that new user to the new database. Refer to How to create MySQL databases and users with SiteWorx for more information.
- Open this new database in PHPMyAdmin, then import the downloaded .sql file to the dev site database. As in Step 3, see How to export tables and import MySQL tables via CLI/SSH or How to import and export MySQL databases in SiteWorx for guidance.
- Change the base URL by opening your newly imported database in PhpMyAdmin, or by accessing via CLI. In the core_config_data table, update the web/unsecure/base_url and web/secure/base_url entries with the URL of your dev site. See How to change Magento URLs for more information.
- Verify you have updated all URLs by searching for %%, and update as necessary.
- Using a text editor, modify your app/etc/local.xml file to the new database name, mysql user, and password you made in Step 4. Save changes on the files you copied to your new dev site.
- Flush your cache. See How to flush your Magento cache for assistance.