[wp-hackers] WP Development & Production Sites

Greg Waugh wphackers at em.stonedrop.com
Fri Nov 19 18:44:19 UTC 2010


I have tried to do something similar in the past with having a separate 
admin instance from production instance.  In other words, a separate server, 
that is not accessible to the public (either by VPN or IP access list only) 
on a different website URL.

If we set up the site with a site_url and home_url as admin.site.com, and 
pointed to the production database it seems to have a few issues:

1) Images uploaded are always linked to the full URL 
(http://admin.site.com/wp-uploads/2010/11/foo.jpg)
2) GUIDs/permalinks become admin.site.com
3) Links within the site always link back to the bloginfo() configured 
website URL (www.site.com) in the production database.  Authors using the 
admin site will get bumped to the public site if they click any links inside 
of the site.
4) The option_siteurl and option_homeurl don't apply to bloginfo() links, so 
plugins/templates that try to use that will get the database URL 
(www.site.com).

I've tried, by using a hack-ish series of filters to remove the absolute 
URLs entirely from WP, so that everything is always only /wp-content, etc.

Is there a simpler approach that I am missing here?





More information about the wp-hackers mailing list