Title: Using WordPress with two different IP&#039;s.
Last modified: August 20, 2016

---

# Using WordPress with two different IP's.

 *  [uninventiveheart](https://wordpress.org/support/users/uninventiveheart/)
 * (@uninventiveheart)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/using-wordpress-with-two-different-ips/)
 * I just installed WordPress through Microsoft’s Web Platform Installer (IIS 7.0/
   Win Svr 2008 R2), and I have (what I think) is a unique problem.
 * The web server I’m using is a “dual” purpose one: serving both our Intranet use
   as well as Extranet applications. Most PHP based installations we use are on 
   relative URL’s, so we can move between our private IP (faking it, let’s say 192.168.15.215)
   and our public IP (again, fake: 108.128.18.79) using those apps by just changing
   the IP and typing the rest of the address the same (192.168.15.215/glpi, for 
   example.) To prevent network loops, the public IP does not work internally, hence
   the need for both addresses.
 * What would be a sane approach to doing this with WordPress? The intent is allowing
   my School District to run a simplistic blog for our website, while not hosting
   it on a webserver our county maintains (they’ve shut off scripting languages 
   for security purposes: for free, we get what we pay for.) The blog would be primarily
   used to generate an RSS feed for parents/students to follow our news, and to 
   show a RSS Feed on the homepage, with links to WordPress to read further.
 * I am using WordPress Bootstrap, a third-party theme not on the WordPress Theme
   Directory, so I assume getting that to work is 100% my own problem. Let’s take
   that part out of the equation, and I’ll use the Twenty Twelve theme until I’m
   sure WordPress is fully functional first.
 * **Option 1.** My thought was to use PHP trickery to get around it on wp-config.
   php:
 *     ```
       $LAN_PREFIX_LVUSD = '192.168.';
       if(substr($_SERVER['REMOTE_ADDR'], 0, strlen($LAN_PREFIX_LVUSD)) == $LAN_PREFIX_LVUSD) {
           define('WP_HOME','http://192.168.15.215/wordpress');
       	define('WP_SITEURL','http://192.168.15.215/wordpress');// The local IP
       } else {
       define('WP_HOME','http://108.128.18.79/wordpress');
       define('WP_SITEURL','http://108.128.18.79/wordpress'); // The public IP
       }
       ```
   
 * While WordPress still works with this hack, it breaks the Themes and Admin Interface
   considerably. Clearly, there’s other issues I haven’t considered.
 * **Option 2.** Would it be possible to make two WordPresses on that server that
   use the same database, but each copy have a different Site/Home URL of each IP
   Address? Any considerations before doing this/parts of WordPress that will not
   work at all/other bad ideas? (Other than the obvious of disk space unnecessarily
   used up for the dual WP installs/theme contents.)
 * NOTE: While scripting languages are off the roster, the host server still allows
   SSI, which combined with JavaScript, gives me barely enough to dynamically redirect
   users to the right page. I use this to work around accessing apps on this “special”
   web server as well.
 * A possible upside to this approach: set the public one as read only (install 
   Disable Comments) and unable to be signed into (delete the Meta Widget, obscure
   the wp-admin directory on the public side), while having the private one available
   for teachers to comment on District News to add on or post corrections to a story.(
   Again, might be chasing rainbows on the back of a rocket-propelled sloth.)
 * **Option 3.** A superior, much better option I haven’t considered.
 * **Option 4.** I’m nuts, this is a stupid idea.

Viewing 1 replies (of 1 total)

 *  Thread Starter [uninventiveheart](https://wordpress.org/support/users/uninventiveheart/)
 * (@uninventiveheart)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/using-wordpress-with-two-different-ips/#post-3107970)
 * Unless this bump helps, I’ll assume silence = Option 4.

Viewing 1 replies (of 1 total)

The topic ‘Using WordPress with two different IP's.’ is closed to new replies.

## Tags

 * [complex](https://wordpress.org/support/topic-tag/complex/)
 * [IP](https://wordpress.org/support/topic-tag/ip/)
 * [same database](https://wordpress.org/support/topic-tag/same-database/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [uninventiveheart](https://wordpress.org/support/users/uninventiveheart/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/using-wordpress-with-two-different-ips/#post-3107970)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
