How to pull down a git repository and make it a Local site?

Has anyone here found a way to download a git(hub) repository and make it a Local site?

I use Github Desktop to clone our repository locally. But then how do I get Local to recognize it as a site?

We tried this. But it resulted in a white screen instead of a webpage:

  1. Used Github Desktop to clone repository locally
  2. Downloaded database locally
  3. Created a new plain Wordpress site in Local
  4. Deleted all the files in /wp-content inthat Wordpress site
  5. Moved the Github clone into the now empty Local site’s /wp-content
  6. Configured wp-config.php to point to the database we had downloaded
  7. The result was a white screen with no code. No errors in the log.

You should be able to figure it out from this post that I wrote regarding WordPress core development.


@scottcodes – Did @afragen’s post help you figure things out?

Usually with a white screen issue, that points to a theme problem. In my experience, that relates to:

  1. The theme folder isn’t in the right place or isn’t named correctly
  2. The DB wasn’t imported correctly or doesn’t have the right theme name within it.

This item stands out to me – I wouldn’t think that you need to change the wp-config.php file. If you have the database sql file downloaded, you should be able to import it into the local site by doing:

  1. Right-click on the site in Local and select “Open Site Shell”
  2. Import the DB dump with something like:
    wp db import db_dump.sql
  3. Search and replace the url
    wp search-replace '/' '/example.local'

Let us know how things are going!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.