Pushing to a Development Server
This guide walks through the process of setting up a development server environment using VentraIP, configuring DNS with Cloudflare, and establishing automated deployments with GitHub Actions.
-
Login to VentraIP:
- Access VentraIP and navigate to the cPanel for
perth.agency.
- Access VentraIP and navigate to the cPanel for
-
Create a New Domain:
- In cPanel, create a new domain, e.g.,
intro.startdigital.com.au. - Untick
Share document rootand set the document root to a simple name likeintro.
- In cPanel, create a new domain, e.g.,
-
Configure DNS in Cloudflare:
- Log in to Cloudflare and navigate to the DNS settings for startdigital.com.au.
- Create an A record that points to the server's IP address. Ensure the name matches the domain created within cPanel.
-
Set Up MySQL Database:
- In cPanel, go to
MySQL® Databases. - Create a new database, a database user, and add the user to the database.
- In cPanel, go to
-
Upload WordPress Core:
- Access the
File Managerin cPanel, find theintrofolder, and extract the WordPress core within the folder.
- Access the
-
Install WordPress:
- Navigate to the domain, e.g.,
intro.startdigital.com.au, and proceed with the standard WordPress setup.
- Navigate to the domain, e.g.,
-
Install WP Migrate Plugin:
- Install the WP Migrate plugin on both the local site and the development site.
-
Migrate Content:
- Click Migrate, and create a find and replace rule for 'http://' with 'https://'.
- Select all options except themes and proceed with the migration.
-
Edit GitHub Workflow:
- Modify the
deploy.yamlfile within your.github/workflowsdirectory. - Change the
server-dirto the domain document root created earlier, e.g.,intro/.
- Modify the
-
Configure FTP Credentials:
- In VentraIP, click manage on
perth.agencyto find the username and password. - Enter the username into the
deploy.yaml. - In the GitHub repository, go to Settings > Secrets & Variables > Repository Secret, and create a
DEV_FTP_PASSsecret containing the FTP password.
- In VentraIP, click manage on
-
Deploy Changes:
- Push the changes to GitHub and monitor the GitHub Actions to ensure the deployment is successful on the server.