Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.