Skip to content

Instantly share code, notes, and snippets.

@okjake
Last active December 21, 2015 12:29
Show Gist options
  • Select an option

  • Save okjake/6306474 to your computer and use it in GitHub Desktop.

Select an option

Save okjake/6306474 to your computer and use it in GitHub Desktop.
steps to proxy a wordpress url to a different server
1. Enable Apache modules if they're not already
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
2. Set up the proxy in a vhost
ProxyPass /localdir http://example.com/remotedir
ProxyPassReverse /localdir http://example.com/remotedir
3. Restart Apache
sudo apachectl graceful
4. Install https://github.com/mistermarco/wp_reverse_proxy/blob/master/su_reverse_proxy.php
5. Switch the WP base URL to the new address
wp-admin -> settings -> general -> site address (url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment