How to use live images on a local WP install? I want to do something like the code down here in the wp-config.php
. Problem is that the siteurl
must be a relative path and cant be a url. I want to set up a local environment to test some parts offline and need to show the images.
if ($_SERVER['SERVER_ADMIN'] == 'dev') {
define('WP_HOME','http://localhost/siteurl.com/public_html/');
define('WP_SITEURL','http://localhost/siteurl.com/public_html/');
// use live images
define( 'UPLOADS', 'http://siteurl.com/wp-content/uploads/' );
}