Answer the question
In order to leave comments, you need to log in
How to deploy a site using this bundle [localhost+bitbucket+combat server]*?
The essence of the question is as follows:
There is a local test server, there is a repository on bitbucket, there is shared hosting. Not dedicated, namely shared.
How to push changes that I have committed locally via bitbucket to the production server?
Climbed the entire Internet found a lot of different solutions, complex and not very.
I have defined this vector for myself: I
create public keys for the locale and the server for access via ssh, I add the generated keys to the settings of the repository that I pushed from the local server. Next, you need to add a URL to the bitbucket webhook to the file that will process the request. Approximately called deploy.php. And again, where is the best place to place this file?
The most ambush and confusion arises when I start creating a repository on a production server, I don’t understand where to create a repository. In public_html, I understand that I shouldn’t do this, ok, for example, I create a repo.git repository next to the public_html folder. Next, I clone from bitbucket to this repository (well, that is, it turns out like this: reop.git-->mysite) here, too, there are no problems, but I need changes in the public.
And one more thing: how to be on the example of WordPress? It turns out that my wordpress is deployed in the public_html folder and the same wordpress will be in the repo.git repository and some script needs to pull the changed files to the public.
Or you should not pull the entire wordpress into the repository, but only for example themes. And, if necessary, a base.
In general, I'm completely confused (
HELP me!
PS Maybe a little confusing and chaotic, but already as I could, sorry)
Answer the question
In order to leave comments, you need to log in
You can take capistrano .
Only WordPress is not particularly friendly with symlinks, so it’s better to set up copying shared files (what is not in the turnip) during deployment.
The task of updating the database through it can also be done. You can either do it yourself or take something like https://github.com/Mixd/wp-deploy
If on linux or poppy, then Wordmove is ideal , for Windows you can set up Deployer .
The simplest automatic site deployment from a git repository to a web server
https://kirkizh.ru/2018/11/git-deploy/
bitbacket has pipelines for auto-deploy, why don't you use them?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question