Title: WordPress via GIT
Last modified: August 22, 2016

---

# WordPress via GIT

 *  [tfatech](https://wordpress.org/support/users/tfatech/)
 * (@tfatech)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/)
 * Hi there,
 * I just saw this community and thought you might have some insight on WP deployment
   via GIT.
 * Another developer already deployed WordPress with GIT to our HostDime cPanel 
   WHM Linux environment, we’re successfully logged in via SSH seeing the GIT file
   and ready to clone. What setup, with WP database migration in mind and in preparation
   for cloning the repository to use as your staging environment, should be configured
   on a Mac 10.9.4? Our goal is to make a workstation for testing instead of testing
   directly on the live server, an example would be daily development or whether
   the WordPress update will break your theme.
 * Our current thought is to use SourceTree with Bitbucket as our GIT GUI, but were
   looking for advice on a working setup for the localized environment from an experienced
   user who has already managed the database transition. We are excited to move 
   towards the GIT workflow but don’t see a great database handoff.
 * We have looked into some database solutions and saw that WP Migrate DB Pro can
   potentially handle the database transitions. We would rather not WP Migrate DB
   Pro
 * Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Chris Barrett](https://wordpress.org/support/users/cbarrett123/)
 * (@cbarrett123)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196094)
 * That’s a great idea to build a localhost testing environment. The process is 
   pretty straight forward, too, using freeware apps like XAMPP and MAMP. For more
   information: [Installing_WordPress_Locally_on_Your_Mac_With_MAMP](http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP)
 * Once you have completed the local version, this link will explain the process
   to move the entire site to a live host: [Moving_WordPress](http://codex.wordpress.org/Moving_WordPress)
   Towards the bottom are links to instructions for popular migration plugin solutions,
   such as [Duplicator](https://wordpress.org/plugins/duplicator/).
 * An alternative option is to look at a complete turnkey solution such as [DesktopServer by ServerPress](http://serverpress.com/products/desktopserver/).
   The free version will allow you to build sites locally that you can then move
   manually. The commercial version also includes a migration plugin that seamlessly
   transitions your localhost site to an empty WordPress installation on your livesite.
 * (Note that I’m not recommending the commercial DesktopServer over other solutions.
   I’ll leave that for you to decide. I simply mention it to make sure you aware
   of the options).
 *  Thread Starter [tfatech](https://wordpress.org/support/users/tfatech/)
 * (@tfatech)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196189)
 * Hi Chris,
 * Thank you for that insight on moving a locally configured site onto the live 
   environment; however, I need to take a live site and clone it to a local environment.
   How does one reverse the local to live process?
 *  [Cindy Cullen](https://wordpress.org/support/users/cgcullen/)
 * (@cgcullen)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196199)
 * Here’s how I do it:
 * I install WordPress on my local environment, then copy the wp-content folder 
   from my live site to replace the wp-content folder on my local.
 * Then I export the live MySQL database with phpmyadmin and import it into my local
   database (same database used for the local install) using my local phpmyadmin.
 * I copy over the script from here: [https://interconnectit.com/products/search-and-replace-for-wordpress-databases/](https://interconnectit.com/products/search-and-replace-for-wordpress-databases/)
   
   and put it inside my WordPress folder (same folder where wp-content is located).
 * Run the migration script to replace the live url with the local url.
 * Everything should work.
 *  Thread Starter [tfatech](https://wordpress.org/support/users/tfatech/)
 * (@tfatech)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196202)
 * Thank you, that is exactly what I was missing. Rather than manually/via FTP, 
   how might one do this via GIT, assuming they’er SSH’d in?
 *  [Cindy Cullen](https://wordpress.org/support/users/cgcullen/)
 * (@cgcullen)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196205)
 * I would think you could just clone and checkout the repo onto your local site.
   The wp-content folder should be the only one that changes, along with your database.
   Maybe the wp-config.php file.
 *  Thread Starter [tfatech](https://wordpress.org/support/users/tfatech/)
 * (@tfatech)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196207)
 * Ah, that makes sense! Do you use MAMP for your local environment? We are looking
   for the best setup for a Mac based environment.
 *  [Cindy Cullen](https://wordpress.org/support/users/cgcullen/)
 * (@cgcullen)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196216)
 * Yes, I use MAMP Pro. I love it!

Viewing 7 replies - 1 through 7 (of 7 total)

 The topic ‘WordPress via GIT’ is closed to new replies.

## Tags

 * [database-migration](https://wordpress.org/support/topic-tag/database-migration/)
 * [deployment](https://wordpress.org/support/topic-tag/deployment/)
 * [git](https://wordpress.org/support/topic-tag/git/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 7 replies
 * 3 participants
 * Last reply from: [Cindy Cullen](https://wordpress.org/support/users/cgcullen/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/wordpress-via-git/#post-5196216)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
