Moving WP from WP Engine to GitHub

  • Open your browser and log into GitHub

  • Create new repo for this project.

  • Create a directory on your PC where your WordPress site can exist locally.

  • use GitInit to set a repository for your new directory.

  • Create a .gitignore file like the one below.

    • add anything extra to the gitignore file you may need

 

screen 0.png
.gitignore file
  • in the terminal type these commands

    • echo Read Me > readme.md

    • git init -b main

    • git add .

    • git commit -m “First Commit”

  • Follow these directions to make your first push to the new Repo.

gitPRoc.png
src Github.com
  • Open the WP Engine dashboard and navigate to the sites tab (on left of screen)

 

 

  • Select the environment for the site you would like to push to github.

  • Then select Backups

    • If there is not a recent backup (since last changes made) please create a new backup

 

 

  • Select Prepare ZIP

  • Select Full Backup and enter in your email for notifications so you will know once it has been completed

  • Once the ZIP is complete download the ZIP file onto your PC in the folder with your new GitHub repo.

    • You can now open the WordPress Site in VS Code and make updates.

  • Verify everything you need to put in the .gitignore file is in that file.

  • Enter these commands into the terminal

    • git add .

    • git commit -m “Initial push of WordPress site [site name]”

    • git push origin main

  • Before development starts make sure to create a develop branch and a branch for each task.