Monday 24 October 2016

How to modify and patch WordPress core on your live site safely using Composer patches


WordPress.org typically make a major release every 3-4 months. This usually introduces a bunch of useful features but they also fix a lot of bugs and issues people have been experiencing with the previous versions. Most of the time you probably don’t notice these problems as WordPress in general is a stable piece of software. This can be a problem if there is a bug in WordPress that affects you. Even if the issue has been recently fixed in trunk it will not reach you until the next stable release of WordPress.
This is where Composer patches is extremely useful. It allows you make modifications to WordPress core (or any package you load via Composer) that are only applied after the package has been loaded.
You can safely modify core without forgetting what you have changed or having your changes wiped out after every new release.
A simple guide to modifying WordPress the right way
The first thing you will need to do is install WordPress via Composer. I would recommend using Roots/Bedrock for this. The project is already configured to load WordPress via Composer but also allows you to manage any dependencies (themes/plugins) via Composer too.
To install Bedrock you can open terminal
Source: https://managewp.org/articles/13686/how-to-modify-and-patch-wordpress-core-on-your-live-site-safely-using-composer-patches




source https://williechiu40.wordpress.com/2016/10/24/how-to-modify-and-patch-wordpress-core-on-your-live-site-safely-using-composer-patches/

No comments:

Post a Comment