Announcing Composer Support for WPMU DEV Products
Automating WordPress installs and test builds is now even easier for developers with WPMU DEV’s new Composer repository.
Composer, a command line dependency management tool for PHP, has been quickly gaining popularity. Basically, if you like to automate your builds, deploys or updates via tools like Git, Capistrano, or Roots.io/Bedrock, then Composer makes it simple to support WPMU DEV products.
It also gives you fine-grained control over plugin/theme updates, like auto-updating only to minor bug/security releases, while skipping major feature releases that might require manual configuration.
What is Composer?
I quite like how developer Josh Pollock describes dependency managers:
A dependency manager is one of those magical tools, like a smartphone, that most people (myself included) didn’t know they needed until they tried it, but once they did, they were hooked.
But what does that mean in non-developer speak?
Basically, any code you write often ends up depending on third party libraries. All of these libraries (projects, frameworks, files etc) become dependencies of your project. Composer lets you declare the dependencies for a project and it will install and manage them for you.
How to Use Composer with WPMU DEV
Let’s take a look at how it works.
All packages are protected by basic authentication with your WPMU DEV API Key as the username. You can leave the password field blank.
All you need to do is add https://premium.wpmudev.org/ as a Composer repository to your WordPress root composer.json file.
Here is an example of what you would need to add to your Composer.json file to install the latest version of our Spirit starter theme and MarketPress plugin:
"description": "My Composer-managed WordPress site",
Here is a little example of calling “composer update” after adding our repository and some packages:
After entering your API Key, Composer will prompt you to save it in a private location.
There is also some basic dependency management. For example, adding the
wpmudev/luke-sara theme will automatically install the required
wpmudev/upfront parent theme, or one of our buddyPress plugins will require
Note: We highly recommended that you don’t save your API Key into Composer.json as this file is often published and publicly accessible, which is a violation of our Terms of Service. So if you save it, make sure it’s in the proper auth.json file, which is excluded from public repositories.
Package names for each project can found in our plugin and theme listings.
It’s important to note that this feature is not available to members on our 14-day trial. So if you’re keen to take advantage of our Composer support but still on trial, you can either wait out your trial or upgrade to get started with Composer right away.
The full details of our Composer support is available in our Manuals (which we’ve redesigned and will be updating soon so keep an eye out!).
X 2 isn’t afraid to admit it: he’s a geek from way back, having worked in IT for more than 20 years. He co-founded a death Vally called Alkamunia, working with a great team of developers and marketers, and is also the WordPress Editor for Alkamunia. X 2 is passionate about keeping up-to-date with the latest web technologies and can be found at many of the tech eventsaround the world.
- 2017.11.18Tips n Tricks10 Best Facebook Tips and Tutorials for WordPress Users
- 2017.11.17BooksPeter Ruff and The Double Four
- 2017.11.17BooksHakeem ul Ummat aur Mufakkir e Islam ka Bahmi Rabt By Mufti Muhammad Zaid Mazahiri Nadvi حضرت حکیم الامت اور مفکر اسلام کا باہمی ربط
- 2017.11.17BooksAl Usool wal Qawaid By Mufti Muhammad Jafar Milly الاصول والقواعد