Forum

Thread tagged as: Question, Configuration, Suggestions

Local Perch Site Utilizing Production DB

Before everyone hops in, I have transitioned to developing all of my sites locally and it has been great! With that being said, there have been rather frequent occasions that I would like to be working locally (MAMP for php etc), but using the production database to pull in the content that is being served on the production website. Is this possible? We do this quite regularly with my full time position (.NET shop) by simply editing our DB connection strings. I've read the document for updating the perch config file to account for local, staging, production databases, but those are just plugging in the credentials to access the DB from what I'm seeing.

Does anyone have any suggestions, ideas, or opinions on the matter?

Thanks in advance!!

Ross Smith

Ross Smith 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You would just add the remote access details to the config file as normal however most hosting companies will have configured the server to not allow access from a remote IP address like that.

Seems to me like you should be dumping the DB and restoring it locally to test with your data from production. You will want to keep in mind that any references to resources within the production DB will not exist on your local system too, so you may want to copy the resources folder from there too.