How to create WordPress dev sites

How to create WordPress dev sites

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

What you need

  • A working, preferably current installation of WordPress
  • 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 about dev site creation
  • MySQL, or phpMyAdmin access through 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 WordPress 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 access via  CLI. In the wp_options table, update the siteurl and home entries with the URL of your dev site. See How to change WordPress URLs for more information.

  7. Using a text editor, modify your wp-config.php file to reflect 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.  For more information, see the official WordPress documentation about editing your wp-config.php file.

  8. If you are a Nexcess client, your service includes the WordPress command line (wp-cli), which allows you to easily change all instances of your old domain name in the database. To do so, issue the below commands, but replace the angled brackets (<>) and everything between them with the indicated information. If you are not a Nexcess client, refer to official WordPress documentation for another way to change your old domain name.

    1. Preview the changes:
      wp search-replace <oldomain.com> <newdomain.com> --dry-run

    2. Search and replace:
      wp search-replace <oldomain.com> <newdomain.com>

  9. If using a WordPress module that enables caching, flush you cache. Refer to the documentation for that module if necessary.

 

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 install WordPress
Added on Tue, Jan 8, 2019
How to configure a WordPress multi-site network
Added on Wed, Jan 2, 2019
How to configure WordPress plug-ins
Added on Thu, Jan 10, 2019
How to configure the Nexcess CDN with WordPress and W3 Total Cache
Added on Thu, Mar 8, 2018
How to add and remove WordPress users
Added on Mon, Jun 4, 2018
How to add Favicons to WordPress
Added on Tue, Jan 8, 2019
How to change WordPress URLs
Added on Wed, Jan 2, 2019
What is WordPress?
Added on Wed, Sep 11, 2013
How to combat WordPress comment spam
Added on Wed, Jan 2, 2019
How to secure your WordPress site
Added on Wed, Dec 26, 2018