Skip to main content
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 ); ...
Mike Eng's user avatar
  • 278
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.
Victoria Ruiz's user avatar
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 ...
Rarst's user avatar
  • 99.9k
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'); ...
WebElaine's user avatar
  • 9,664
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'] ...
birgire's user avatar
  • 67.8k
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. ...
Rarst's user avatar
  • 99.9k
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 ...
Anson W Han's user avatar
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 ...
sbddesign's user avatar
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.
Laxmana's user avatar
  • 1,332
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 ...
David Sword's user avatar
  • 3,357
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 ...
Morgan Estes's user avatar
  • 1,545
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 ...
Castiblanco's user avatar
  • 2,194
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 ...
Jacob Peattie's user avatar
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 ...
Tom J Nowell's user avatar
  • 60.6k
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 ...
Dave Eversden's user avatar
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. ...
T.Todua's user avatar
  • 5,850
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/...
Pat J's user avatar
  • 12.3k
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,...
Sunny Johal's user avatar
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 ...
MikeSchinkel's user avatar
  • 37.5k
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 ...
Mark Kaplun's user avatar
  • 23.7k
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 ...
spacegrrl's user avatar
  • 111
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 ...
Den Isahac's user avatar
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 ...
JItendra Rana's user avatar
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 ...
prosti's user avatar
  • 4,323
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 ...
Rick Mac Gillis's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible