Download the PHP package leymannx/wordpress-project without Composer

On this page you can find all versions of the php package leymannx/wordpress-project. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wordpress-project

Composer Template for WordPress Projects

Replace some-dir with whatever directory name you wish.

Usage

  1. Run above command.
  2. Point your vhost to some-dir/web.
  3. Open site in browser and start WordPress installation as usual.

Optionally:

Custom plugins and themes

Custom stuff all goes inside some-dir/wp-custom. There are subfolders for themes and plugins. They will get symlinked automatically into the right location on every composer install run.

wordpress.org plugins and themes

Plugins are added to your project by running composer require wpackagist-plugin/plugin-name and themes by composer require wpackagist-theme/theme-name. You then can enable them normally via WP-CLI or from the backend as usual.

Update WordPress, plugins and themes

Managing your WordPress site with Composer means you also update it with Composer. And maybe use a plugin like WP Update Settings to disable backend notifications.

Recommendations

I strongly recommend to use WP-CFM to synchronize your WordPress configuration across all environments. After you activated the plugin you may want to have the config exported to/imported from some-dir/wp-config/cfm. So place the following code into a custom mu-plugin under some-dir/wp-custom/mu-plugins/some-file.php and run composer install once to have it symlinked into the right location.

After you've set up your initial config in the backend you can export changes into some .json file(s) anytime either from the backend by running wp config push some-config. From now on it's as easy as putting the following commands into your deployment routine to have these changes synced across all environments.

Why?

Why another Composer template for WordPress? Well, at the time of writing this I found all other templates out there either too bloated or too minimalistic. I wanted to have a template that devides custom code and contrib code into dedicated locations (like in Drupal) and then have everything tied together into an absolutely normal WordPress.

And I wanted to be able to simply delete the whole some-dir/web folder and then just run composer install to have everything up and running again. Try it out yourself. That's a good feeling. With this template you shouldn't need to ever actually put a foot into the some-dir/web folder.

I achieved that by using symlinks that get created/removed automatically as post-install-cmd and post-update-cmd commands from Composer. It's a pitty that WordPress doesn't come with its own composer.json.

Why Composer at all? Because it sucks to have the whole monolithic codebase of WordPress pushed into a repo when all you really need are some few custom files whereas everything else should be just another dependency to pull.

Credits


All versions of wordpress-project with dependencies

PHP Build Version
Package Version
Requires johnpbloch/wordpress-core Version ^5.0
leymannx/wordpress-finder Version ^0.0.14
oomphinc/composer-installers-extender Version ^1.1
vlucas/phpdotenv Version ^3.3
wp-cli/wp-cli-bundle Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leymannx/wordpress-project contains the following files

Loading the files please wait ....