Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aubreypwd/php-s-wp
A few fixes to make WordPress and php -S work well together.
https://github.com/aubreypwd/php-s-wp
composer composer-package php php-server wordpress
Last synced: about 17 hours ago
JSON representation
A few fixes to make WordPress and php -S work well together.
- Host: GitHub
- URL: https://github.com/aubreypwd/php-s-wp
- Owner: aubreypwd
- License: mit
- Created: 2022-06-29T16:30:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-29T17:31:43.000Z (over 2 years ago)
- Last Synced: 2024-08-23T18:59:05.517Z (3 months ago)
- Topics: composer, composer-package, php, php-server, wordpress
- Language: PHP
- Homepage: https://packagist.org/packages/aubreypwd/php-s-wp
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This package is intened to be installed in the WordPress root and loaded via `autoload.php` so WordPress plays nicely with `php -S`.
# Installation & Use
```bash
composer require aubreypwd/php-s-wp
```Then in your `wp-config.php` make sure and require `autoload.php` e.g.:
```php
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
```# Fixes accessing e.g. `/wp-admin` w/out trailing slash
Now you can start up `php -S` in your WordPress root and places like `http://localhost:8000/wp-admin` will be automatically re-directed to `http://localhost:8000/wp-admin/` so things don't break.