Jump to content

recommended workflow


Bastien Girschig
 Share

Recommended Posts

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 !

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...