Skip to content

trendwerk/auto-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Auto update

This manual describes on how to setup WordPress' default update behaviour when using trendwerk/bedrock.

1. Allow file modifications

Remove this line from your configuration file:

define('DISALLOW_FILE_MODS', true);

2. Disallow file editing

This disabled the "Editor" for themes and plugins. Add this to your configuration file:

define('DISALLOW_FILE_EDIT', true);

3. Allow updates, even when using a VCS

By default WordPress searches for a VCS folder. If it finds one, it halts all updates. The following filter allows you to override this behaviour.

Add this filter upon initialization (for example, in your theme):

add_filter('automatic_updates_is_vcs_checkout', '__return_false');

4. Capistrano rake task

Of course, the production code will not match to the VCS's code if you enable updates like this. To make sure you don't revert to wrong versions when deploying with Capistrano, you could add the rake task found in this repo.

Run it on before each deployment:

before :deploy, "deploy:confirm"

The rake task uses fazibear/colorize. To use it, include this as a dependency in your Gemfile.

About

Setup auto-updates for WordPress, for Bedrock.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages