1. Home
  2. Docs
  3. Development
  4. Software Environments
  5. Creating a Developer Environment

Creating a Developer Environment

Below are the steps needed to create a new Developer Environment on the TownSites server.

Note: If you’re just starting to develop, these instructions likely don’t apply to you. Follow the instructions in Setting Up Your Developer Environment instead.

  • Log in to Cpanel as townsitesdev.
  • Create a new domain. E.g., dev00.townsites.dev at document root public_html/dev00.townsites.dev
  • Go to WHM→Manage AutoSSL→Run AutoSSL For All Users.
  • Login to SFTP as townsitesdev and install WordPress in the new directory using wp-downloader.php.
    • Use {subdomain}_ as the table prefix.
  • Configure the new installation as a subdirectory multisite.
  • Using AIO WP Migration, copy the Staging site to the new dev site.
    • Directory path: /home/townsitesdev/public_html/staging.townsites.dev/wp-content/ai1wm-backups
  • Create a new superuser and record the login info to give to the developer.
  • In the installation’s root directory, create a directory named primary and repeat the steps above to install the primary site.
    • Use {subdomain}primary_ as the table prefix.
  • Using AIO WP Migration, copy the Staging Primary site to the new primary site.
    • Directory path: /home/townsitesdev/public_html/staging.townsites.dev/primary/wp-content/ai1wm-backups
  • Create a new admin and record the login info to give to the developer.
  • In Windows Terminal, run ssh-keygen to generate a new SSH key.
  • Login to the server as root and add the public key to /etc/ssh/authorized_keys.
  • Send the developer the private key and the instructions located here.
  • Via SSH, log in as townsitesdev and navigate to the new installation.
  • Navigate the the new installation directory and install Git:
git init
git remote add origin https://github.com/townsites/townsites.git
git fetch
git reset origin/dev
git checkout -t -f origin/dev