• 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)
  • 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

    Once you have completed the local version, this link will explain the process to move the entire site to a live host: Moving_WordPress Towards the bottom are links to instructions for popular migration plugin solutions, such as Duplicator.

    An alternative option is to look at a complete turnkey solution such as DesktopServer by ServerPress. 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

    (@tfatech)

    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?

    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/
    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

    (@tfatech)

    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?

    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

    (@tfatech)

    Ah, that makes sense! Do you use MAMP for your local environment? We are looking for the best setup for a Mac based environment.

    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.