Skip to content

Instantly share code, notes, and snippets.

View fabrizim's full-sized avatar

fabrizim

View GitHub Profile
@fabrizim
fabrizim / .htaccess
Last active March 12, 2020 17:36
wp-content/uploads filler for staging environments
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^wp\-content\/uploads(.*)$ https://production-domain.com/wp-content/uploads$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^wp\-content\/blogs(.*)$ https://production-domain.com/wp-content/blogs$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
@joehoyle
joehoyle / wp-api-batch.php
Last active March 7, 2024 02:13
Batch endpoint for the WP REST API
<?php
/**
* Plugin Name: WP REST API Batch Requests
* Description: Enabled a multi / batch requests endpoint for the WP RES API
* Author: Joe Hoyle
* Version: 1.0-alpha1
* Plugin URI: https://github.com/WP-API/WP-API
* License: GPL2+
*/