learn and experiment with all things WordPress and WordPress VIP (aka Enterprise WordPress)
Running using Docker Compose
# ensure docker is up and running
# start
docker-compose up -d
# admin ui (login: admin/password01)
open http://localhost:8000/wp-admin
# site
open http://localhost:8000
# root rest api routes
curl http://localhost:8000/index.php?rest_route=/ | jq '.'
# rest api routes
curl http://localhost:8000/\?rest_route\=/wp/v2 | jq '.'
# rest api posts example
curl http://localhost:8000/?rest_route=/wp/v2/posts | jq '.'
# stop
docker-compose down
Extending WP REST API | Adding Custom Endpoints | Custom Plugin Example
based on Adding Custom Endpoints
create
wp-root/wp-content/plugins/myplugin.phpif needed, copy to “live” plugins directory
cp wp-root/wp-content/plugins/myplugin.php html/wp-content/plugins/myplugin.phpactivate via Admin | Plugins

access custom endpoint http://localhost:8000/index.php?rest_route=/myplugin/v1/author/1

Running using VVV (Varying Vagrant Vagrants)
Setup
- install System Requirements
- execute Installation steps
Running
root directory path ~/vagrant-local
vagrant upadd VirtualBox port mappings
0.0.0.0:80 -> 80
update
/etc/hoststo point to127.0.0.1sudo sed -i.bu 's/192.168.50.4/127.0.0.1/g' /etc/hosts
visit http://vvv.test
Shouldn’t need to do the
/etc/hostsand VirtualBox port mapping steps. This is a workaround to deal with an iss where macOS ignores the entries added by thevagrant-hostsupdaterplugin in/etc/hostsfile.
stopping
vagrant haltthis removes
/etc/hostsentries
Changes
Allow logging in to a WP VIP site (e.g. http://WP-VIP-SITE/wp-admin) with admin / password.
changed wpcom_vip_is_restricted_username @ WP-VIP-SITE/public_html/wp-content/mu-plugins/security.php to
function wpcom_vip_is_restricted_username( $username ) {
// return 'admin' === $username
// || WPCOM_VIP_MACHINE_USER_LOGIN === $username
// || WPCOM_VIP_MACHINE_USER_EMAIL === $username;
return false;
}
Remove VIP_MAINTENANCE_MODE not defined error message showing in wp-admin and site UIs
added the following to WP-VIP-SITE/public_html/wp-content/client-mu-plugins/plugin-loader.php to get rid of
VIP_MAINTENANCE_MODE not defined error message showing in wp-admin and site UIs.
define( 'VIP_MAINTENANCE_MODE', false );
Resources
- Quickstart: Compose and WordPress
- WordPress VIP Documentation
- WordPress | REST API Handbook
- Block Editor Handbook
- WordPress/gutenberg
- packages/block-library - Block library for the WordPress editor.
- WordPress Storybook site
- developer.wordpress.org
- codex.wordpress.org
- Adding Custom Endpoints
- WPGraphQL - graphql API for WP
- Automattic/vip-go-mu-plugins - The development repo for mu-plugins used on the VIP Go platform.
- Automattic/vip-go-mu-plugins-built - The generated repo for mu-plugins used on the VIP Go platform
- Theme Handbook / Advanced Theme Topics / Child Themes
Twitter • Reddit