简体   繁体   中英

Looking for a way to deploy my wordpress sites (git-repository)

So currently I try to set up a new workflow. This is what I currently have:

I work with VVV so I have such structure:

xyz.de.dev/
---- .git/
---- bower_components/
---- node_modules/
---- wp-content/
---- wp-includes/
---- wp-admin/
---- .gitignore
---- other WP files...

So that is my git-powered local development environment of the project. I also set up a private bitbucket project and I'm pushing my local dev to that project using "git push origin master".

Now I have a Webserver which should act as a staging server. I have SSH access and git is installed on that server.

Which would be the best way to deploy my local development to a staging or later a live server? I already tried to clone the bitbucket project to my staging server and then, git pull every time I updated the project. But that didnt work out as expected.

What would you suggest?

Which would be the best way to deploy my local development to a staging or later a live server?

My colleague built something your are looking for for our company website:

  1. Create a remote branch to release on your server (eg Remote)
  2. Merge your current version from your Development-branch into your Remote-branch
  3. create a dump-file of your wordpress database (you can write a script that will do this automatically when you commit)
  4. fetch and pull your changes on your server
  5. Importing your dump on the server. You have to write a script, that search and replace path (different from your local path) and I guess your login is different to your local db.

I hope this helps you in your further considerations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM