Contact
Site: US UK AU |

How to create Magento 2 dev sites

How to create Magento 2 dev sites 

Overview
This article explains how Nexcess Classic (non-Cloud) clients can create Magento 2 development (dev) sites.

What you need

  • A working, preferably current installation of Magento 2
  • A Nexcess Classic (non-Cloud) account and access to SiteWorx; If you use Nexcess Cloud, see instead What are Nexcess Cloud dev sites? for details regarding dev site creation
  • MySQL or phpMyAdmin (via SiteWorx)
  • SSH (recommended), FileZilla, or a similar file-transfer utility

Method

ATTENTION: This method is intended only for Nexcess Classic (non-Cloud) clients. If you use Nexcess Cloud, see instead What are Nexcess Cloud dev sites? for details about dev site creation.

  1. Create the secondary domain to serve as the dev site. For details, refer to How to add secondary domains with SiteWorx.

  2. Using SSH, FileZilla, or a similar file-transfer program, copy your website files from your Magento 2 installation to your new secondary domain. SSH is the preferred method, as FTP may take considerable time to copy these files. See How to set up FileZilla and How to use FileZilla for more information.

  3. 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.

  4. 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.

  5. 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.

  6. 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_urlweb/secure/base_url, and design/head/includes entries with the URL of your dev site. See How to change base URLs in Magento 2 for more information.

  7. Verify you have updated all URLs searching for %<your_domain.com>% and update as necessary.

  8. Using a text editor, modify the env.php file (under app/etc/env.php) to reflect the new db name, username, and password you created in Step 4. 


  9. Flush your cache. If using Magento, see How to flush your Magento cache for assistance. 

 

For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to change base URLs in Magento 2
Added on Wed, Jun 13, 2018
How to manage disk space in Magento
Added on Tue, Jan 15, 2019
How to configure Magento 2 storefronts
Added on Mon, Dec 31, 2018
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to reset Magento 2 admin passwords
Added on Fri, Dec 28, 2018
How to set up CDN access for Magento 2
Added on Wed, May 16, 2018
How to configure the return path email in Magento 2
Added on Mon, Dec 31, 2018
How to configure Magento 2 cron jobs
Added on Tue, Mar 27, 2018
How to disable maintenance mode in Magento
Added on Fri, Dec 15, 2017
How to write redirect (301) rules for Magento 2
Added on Mon, Dec 31, 2018