Skip to content

Setting up WordPress projects at Getfives

Lubos Kmetko edited this page Oct 25, 2017 · 20 revisions

Initial Setup

The initial setup is common for the both workflows. Once you are done with it, continue with the pull or the push workflow setup.

Create project at Getfives

  1. Create new Chisel WordPress with Frontend project
  2. git clone repository

Setup Chisel project locally

  1. Run yo chisel to setup project locally
  2. Select WordPress with Front-end
  3. Choose plugins WP Sync DB and WP Sync DB Media File Addon
  4. Commit & push

Pull Workflow Setup

The pull workflow is recommended workflow and it assumes that all DB updates are done in WP admin on x5view.co and pulled to local database. This allows more developers to work on the same project without overriding their updates.

Setup WordPress site at x5view.co

  1. Go to the project site at x5view.co
  2. Install WordPress. Enter the site details, use https://your-project-url.x5view.co as the site address
  3. Login to WordPress admin and activate plugins WP Sync DB and WP Sync DB Media File Addon
  4. Go to Tools / Migrate DB / Settings
  5. Check Accept pull requests allow this database to be exported and downloaded

Set up local WordPress site

  1. Login to WordPress admin of your local project
  2. Click on Pull Replace this site's db with remote db
  3. Copy connection info from the x5view.co site
  4. Enter Username & Password of the site
  5. In the Find & Replace section set up the https://your-project-url.x5view.co to be replaced with http://your-project-url.test (not localhost:3000)
  6. Check Save Migration Profile
  7. Click Migrate DB & Save

Make sure you make all content updates in WordPress admin on x5view.co first (add custom fields, change content etc.) and then pull the database using Migrate DB plugin to your local setup. Communicate with other developers frequently to ensure you are working on separate tasks to not overwrite each other's changes.

Note: After migration is done, you might be logged of from your local WP admin. This is normal.

Push Workflow Setup

If you are the only developer on the project you can do DB updates in WP admin in your local version and push to x5view.co database. Ensure that you switch to pull workflow to avoid DB overrides if other developer joins the project.

Setup WordPress site at x5view.co

  1. Go to the project site at x5view.co
  2. Install WordPress. Enter the site details (they will be overridden with your local database later).
  3. Login to WordPress admin and activate plugins WP Sync DB and WP Sync DB Media File Addon
  4. Go to Tools / Migrate DB / Settings
  5. Set Accept push requests allow this database to be overwritten

Set up local WordPress site

  1. Login to WordPress admin of your local project
  2. Go to Tools / Migrate DB
  3. Click on Push Replace remote db with this site's db
  4. Copy connection info from the x5view.co site
  5. Enter Username & Password of the site
  6. In the Find & Replace section set up http://your-project-url.test (not localhost:3000) to be replaced with the https://your-project-url.x5view.co
  7. Check Save Migration Profile
  8. Click Migrate DB & Save