...
Create the project in local by selecting 'Add Local Site'
Once the site is created, clone the project via git
(For Jesse/Ubuntu) Next, Ubuntu users need to rename the wp-content directory in order to successfully create a symlink in next step. i.e.:
Code Block mv ~/Local\ Sites/rocketshipstaging/app/public/wp-content/ ~/Local\ Sites/rocketshipstaging/app/public/wp-content-bak/
Now we must symlink the repos together. In my case, I cloned my repo to
~/Documents/repos/
so a symlink for a default Local install looks like this:ln -s /Users/colegeerts/Documents/repos/aptp/wordpress/wp-content /Users/colegeerts/Local\ Sites/aptp/app/public/
for Jesse/Ubuntu I use:
Code Block ln -s ~/Documents/rocketship/wp-content/ ~/Local\ Sites/rocketshipstaging/app/public/wp-content
Download the Database
Should the Wordpress install contain WPMigrate PRO, the easiest method is to likely just leverage that like so:
Make sure you have it activated on the Staging site and your Local Dev site. Then head to/wp-admin/tools.php?page=wp-migrate-db-pro#settings
to grab the connection info. Go back to your local dev environment to/wp-admin/tools.php?page=wp-migrate-db-pro#migrate
. Choose Pull and enter the copied connection info into the Remote Site text area. You'll then need to enter the username and password to access staging. Then your settings should be something like this. Then Pull. It will take about 5 minute or less. Then the local dev site will say Complete and might log you out. Just sign back in and you're good to go.Should there not be a connected WPMigrate PRO, download the database and conduct a find and replace for the base url of the application. In my case I use sed, so I invoke a command that looks like:
sed -i 's/https:\/\/aptp\.com/http:\/\/aptp\.local/g' wordpress.sql
This command will look different based on the URL you want to swap. Basically we should be swapping the live url for the Local one
Import the site via adminer on the Database tab.