Skip to Content Skip to Search Go to Top Navigation Go to Side Menu


using wordpress from multiple locations


Wednesday, May 21, 2008

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Wordpress checks to make sure your running on from the proper site location. Problem is sometimes you just need it to run.

ex: wordpress runs at elsid.net, admin runs at admin.iamsid.net

Or you run both your development and production version of wordpress from the same db

edit the get_option function in the functions.php file in the wordpress includes folder

replace :

function get_option($setting){
global $wpdb;

with

function get_option($setting){
global $wpdb,$_SERVER;
if(strpos(”siteurl|home”,$setting)!==false){
return “http://”.$_SERVER[’HTTP_HOST’];
}

you could use the update option function, but it adds unneeded overhead

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
Might Be Related

Leave a Reply


In order to submit a comment, you need to mention your name and your email address (which won't be published). And ... don't forget your comment!

Comment Form