Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szepeviktor/wordpress-autoloaded
:keycap_ten:% Faster WordPress :zap: without unconditional class loading + Composer
https://github.com/szepeviktor/wordpress-autoloaded
autoloading composer performance wordpress
Last synced: 2 months ago
JSON representation
:keycap_ten:% Faster WordPress :zap: without unconditional class loading + Composer
- Host: GitHub
- URL: https://github.com/szepeviktor/wordpress-autoloaded
- Owner: szepeviktor
- License: mit
- Created: 2019-02-23T13:27:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T05:37:24.000Z (over 1 year ago)
- Last Synced: 2024-10-09T10:08:38.554Z (3 months ago)
- Topics: autoloading, composer, performance, wordpress
- Language: Shell
- Homepage: https://core.trac.wordpress.org/ticket/36335
- Size: 17.6 KB
- Stars: 30
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Autoloaded
A boilerplate to start a fast WordPress website
without unconditional class loading using Composer autoloader.Core is downloaded from the [official ZIP](https://wordpress.org/download/releases/)
and unconditional class loading is commented out.:bulb: Please also see [szepeviktor/composer-managed-wordpress](https://github.com/szepeviktor/composer-managed-wordpress)
## Support my work
Please consider sponsoring me monthly if you use my packages in an agency.
[![Sponsor](https://github.com/szepeviktor/.github/raw/master/.github/assets/github-like-sponsor-button.svg)](https://github.com/sponsors/szepeviktor)
## Usage
- Clone [this repository](https://github.com/szepeviktor/wordpress-autoloaded)
- Optionally use `johnpbloch/wordpress` package instead of the included official ZIP,
see `composer.json` in examples/johnpbloch-wordpress/ directory
- Add plugins e.g. `composer require wpackagist-plugin/wordpress-seo`
- Add your theme
- Prefer class autoloading in theme and plugins,
simply add the following to composer.json```json
"autoload": {
"psr-4": {
"MyNamespace\\": "inc/"
}
},
"config": {
"classmap-authoritative": true
}
```## Configuring WordPress
Add Composer autoloader to `app/wp-config.php`
```php
require_once dirname(__DIR__) . '/vendor/autoload.php';
```