Bastien Girschig Posted November 16, 2018 Posted November 16, 2018 Hello! I am pretty new to processwire, and trying to find a good workflow with it. This is not specific to PW but I am hoping some of you might still be able to help me out I am used to having a local copy of whatever I'm working on, then when I'm happy with what I have, deploy it. What I was hoping to do is simply use my prod database (or a staging one) while modifying my template locally. However, this is not allowed by my server (can't connect to database from anywhere except the same server). Then I thought I might find some sort of sql proxy in php, to override this limitation, but I don't think that's actually possible. Now what I do is either: Delete everything and setup the website again (using site profile exporter). This is a very inefficient process and I hate it Use my ftp client to do a quick-edit, one file at a time. This makes it impossible to do source control on my template, and I hate it as well I'm sure there is a better way... Thanks !
bernhard Posted November 16, 2018 Posted November 16, 2018 Hello Bastien and welcome to the forum, there's no one single one-click solution for that, but we have several options. Did you already do some research? https://www.google.com/search?q=site:processwire.com+live+staging
eelkenet Posted November 16, 2018 Posted November 16, 2018 Tip: If you install TracyDebugger, you automatically also get Adminer, with which it is very easy to import/export your full database from and to your local/staging server. 1
Bastien Girschig Posted November 16, 2018 Author Posted November 16, 2018 @bernhard: Thanks, but I don't think that would work. A staging environment would be helpful but not allow me to work on a local copy, would it ? @eelkenet: Thanks as well, this looks super useful. I'll check it out
bernhard Posted November 16, 2018 Posted November 16, 2018 7 minutes ago, Bastien Girschig said: @bernhard: Thanks, but I don't think that would work. A staging environment would be helpful but not allow me to work on a local copy, would it ? Of course it works. If you don't like the wording "staging" you can also google for "migration live" https://www.google.com/search?q=site:processwire.com+migration+live
Mikie Posted November 17, 2018 Posted November 17, 2018 What source control do you use? For jobs where client are on shared hosting https://github.com/git-ftp/git-ftp works really well for basic deployment and even rollbacks if necessary, I can tell you my workflow with it if you'd like but it's pretty simple. Re the database, not sure exactly what you are after. If I have ssh access I use a bash script I based off this one https://gist.github.com/samhernandez/25e26269438e4ceaf37f to sync local and remote databases and files. I use it to pull down latest state from the server, but you could also use it to push from local I guess, or sync between staging and live. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now