Answer the question
In order to leave comments, you need to log in
How to easily organize version control for a site on Wordpress?
There is a site on Wordpress. It works on shared hosting. I make changes to this site from time to time. For example, I add a plugin, I test styles, I edit the code a little, etc.
Now I'm doing it, I'm ashamed to say, on the combat version of the site. Obviously this is wrong.
I want to test the changes before putting them on the production site. What is the best way to do this?
The first thing that comes to mind is to install a version control system. However, I have not installed such services before. I don’t even know where to start, which system to choose, etc.
I also came up with the decision to stupidly make a copy of the site on a subdomain, close it from the outside and test the changes on it. But this option is not very pleasant, as it requires constant updating of the copy, and leads to unnecessary manual work on transferring changes.
I look forward to your help and advice! I will be very grateful!
Answer the question
In order to leave comments, you need to log in
OpenShift immediately publishes code via GIT. Made very comfortable and professional.
Commit, then push, and then autoscripts deploy it on combat.
If you set it up yourself, then yourself. Raise on your GIT server and customize your schemes. We somehow did it, but at the level of dancing with tambourines. They danced, it seems that it worked. We worked. Now that project is closed. And there is no current need for GIT.
More precisely, there is, but just through GitHub. We upload new versions to GitHub, and in the plugin for WP there is a class that can take a new version from GitHub through the standard WP update mechanism.
Uploaded a new version to GIT, gave it a type label version 2.2
Next, we go to the console and there a notification appears that they say I see a new version of the plugin. I click to update and uploaded from GitHub. In general, very convenient.
There is no life without a test copy, use git, well, automate the transfer from test to production script like all normal people, you directly run into problems that are not problems for a programmer.
Setting up Mercurial and syncing clones is easy.
The main problem is that you need to transfer not only files, but also settings, and they are stored in SQL.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question