11
votes
Accepted
Enable automatic minor core updates when root of site is a git repository
Adding this filter in a must-use plugin or functions.php will allow automatic updates even if the site is under version control:
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );
...
4
votes
Accepted
GIT and Development URL's point to production
I would use WP DB Migrate to export the DB in the production environment. It allows you to rewrite URLs. Then you import that in your local DB.
4
votes
Accepted
git and local wordpress: how to handle wordpress updates?
I would formulate your requirements like this:
repository should capture complete and precise state of site
updates should be tested locally and pushed to production
database update events should run ...
4
votes
Different color admin bars for dev, staging and production
You can use a filter to set the admin color scheme, which includes colors for the admin bar:
<?php // add a filter
add_filter('get_user_option_admin_color', 'wpse_313419_conditional_admin_color');
...
4
votes
Accepted
WordPress Health Tool reporting version control as a critical issue
There's the site_status_tests filter, to e.g. remove the asynchronous background updates tests:
add_filter( 'site_status_tests', function ( $tests ) {
unset( $tests['async']['background_updates'] ...
3
votes
Accepted
Git vs Child Theme
While I know version control approach to be used in practice, I don't think it's too common. WP has weak version control practices in general, so development of extensions doesn't quite plan for such.
...
3
votes
GIT and Development URL's point to production
Besides doing the find and replace on the domain as saved in the site's database, you'll also want to either:
ignore and remove the wp-config.php file from your git repo (so that the local ...
2
votes
Wordpress and Git - What folders should I track?
It depends on the situation. However, in my view, Git versioning a WordPress site is often more hassle than it's worth. The reason is because tracking the state of the site can not be distilled down ...
2
votes
Environment independent way to link to certain pages on frontend
I think the best way is to create Theme Options and let the administrator decide which page is each one, with a dropdown for example.
This way you can get the selected page no matter the environment.
2
votes
Accepted
Wordpress updates and Git
In my readings (and as mentioned in OP comments) the best practice seemed to be focusing on the /wp-content/ folder, or specific custom contents therein. Syncing all the core files and third party ...
2
votes
GIT and Development URL's point to production
My preferred method is to use WP CLI's search-replace command to swap out domains in my local site. If I have example.com on my live site, I'll use example.local on my local install, so the command to ...
2
votes
Accepted
What is the usual process of saving changes made at the CMS level into source control?
Generally, there are two sets of data you want to control with WordPress:
Files
Database
So, in theory, you can do it all by hand copying your filesystem and database every day. Now, let's go to the ...
1
vote
Provide logo in theme
Now how can I update the site logo? The theme header is using the_custom_logo() and so from what I can tell this file has to be
uploaded.
If your theme is using the_custom_logo() then you can edit it ...
1
vote
SSH git — How to pull a folder from repo, but not delete other directories & files on deployment server
Enter my question: When I SSH into the Linux web server where my website is hosted, how do I perform a git pull origin dev so that git doesn't delete my entire WordPress site, replacing it with only ...
1
vote
Wordpres core-update theme renames theme folder name
My first instinct upon reading this was that a Wordpress Plugin may give you more control over this behaviour. Have you considered writing a plugin to pull and apply the updates?
A quick Google on the ...
1
vote
What is the usual process of saving changes made at the CMS level into source control?
What is not safe:
Using only revisor or audit-trail plugins, it's not safe, because if s/he is an unreliable developer, he can easily modify files/DB of those plugins too to hide certain actions.
...
1
vote
When I try to install VersionPress, it tells me, "The package could not be installed. No valid plugins were found."
It looks like the file you downloaded, versionpress-master.zip, isn't structured like a WordPress plugin. When I unzip versionpress-master.zip, the plugin looks like it's in the directory plugins/...
1
vote
How should I be handling my theme version numbering?
It is good practise to use semantic versioning e.g. 1.0.1 MAJOR.MINOR.PATCH
MAJOR version when you make incompatible changes,
MINOR version when you add functionality in a backwards-compatible manner,...
1
vote
Different color admin bars for dev, staging and production
Fortunately the solution you want is actually quite simple. Just use the 'wp_before_admin_bar_render' action hook and output CSS to change the color and background of the HTML element with the id of ...
1
vote
Syncing local content with development / staging sites
Code changes should go into GIT and pulled (or use some more elaborate script that does a build from the code pulled). Content changes should only be done on production or a "content staging" server ...
1
vote
Syncing local content with development / staging sites
For our site, we've written a Perl script that copies the database then uses wp-cli commands to tweak certain settings that are local to a given site. The script also fires off a UNIX line command to ...
1
vote
Syncing local content with development / staging sites
Overview
That's the one main caveat of WordPress development, that even a seasoned WordPress developer still wonders what's the perfect automation for syncing database content from local environment ...
1
vote
best practice on pushing staging development (database/uploads) to the live server
You can use WordMove. I have been using WordMove for deployment from last 3 months and it helps easily sync your local and live instance.
And its very easy to use as well.
Wordmove is a gem that ...
1
vote
Git vs Child Theme
If you plan to sell your theme later, I would go with the git.
It is up to you how you will organize yourself to work with the git.
What I know creating new branches in git is a breeze, and you ...
1
vote
Why Does Automattic use SVN for WordPress Instead of Git?
WordPress does a lot of things backwards. (Maybe they like to be different?) A couple things that come to mind are...
They refuse to exhibit clean code standards, and in fact reject anyone's attempts ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
git × 105deployment × 16
version-control × 15
github × 15
plugins × 13
database × 10
theme-development × 9
updates × 9
svn × 9
automatic-updates × 6
workflow × 6
plugin-development × 4
customization × 4
themes × 4
staging × 4
hosting × 3
testing × 3
composer × 3
php × 2
child-theme × 2
options × 2
migration × 2
installation × 2
localization × 2
upgrade × 2