Title: Subdomain with Same Database Content?
Last modified: August 19, 2016

---

# Subdomain with Same Database Content?

 *  [ericksonstudio](https://wordpress.org/support/users/ericksonstudio/)
 * (@ericksonstudio)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/)
 * I’ve searched high-and-low and haven’t found a solution for this, so I throw 
   this to the WP community…
 * I have a client who wants a separate subdomain for an “iPhone-only” site, so 
   _iphone.domain.com_. We have a beautifully working WP site already. The subdomain
   should pull from the same database as the main “www” site. The _[http://www.domain.com](http://www.domain.com)_
   WP files are in a **/www** directory, but the _iphone_ files are in the **/subdomains/
   iphone/www** directory.
 * I want to pull the last 5 general posts, plus _n_ number of posts from a specific
   category, but the real question is _can I use the same content across subdomains
   on the same site and how?_
 * Yes, I know it would be easier to create an iPhone Theme and use a automagic 
   theme-switcher, but this is what the client wants.
 * Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [ericksonstudio](https://wordpress.org/support/users/ericksonstudio/)
 * (@ericksonstudio)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673640)
 * Anyone? Help?
 *  [lcornwell](https://wordpress.org/support/users/lcornwell/)
 * (@lcornwell)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673646)
 * I believe the only way to do this would be to have an installation of wordpress
   in a subfolder of the root. that way it can address the files of the original.
   If it is in a seperate folder there is not a way to map it correctly.
 * I have a limited knowledge of this stuff…so I may be incorrect.
 * Why not do [http://www.domain.com/iphone??](http://www.domain.com/iphone??)
 *  Thread Starter [ericksonstudio](https://wordpress.org/support/users/ericksonstudio/)
 * (@ericksonstudio)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673653)
 * > Why not do [http://www.domain.com/iphone??](http://www.domain.com/iphone??)
 * The simple answer is the client doesn’t want it.
 * Thanks for the idea. I think I tried that already, but I’ll give it another shot.
 * Anyone else have some experience with this?
 *  [Charles E. Frees-Melvin](https://wordpress.org/support/users/thee17/)
 * (@thee17)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673654)
 * Okay this is not going to be easy but is possiable.
 * The page mist be a php page, if you place
    `<?php require('../wp-blog-header.
   php'); ?>` at the top of the page and point it to the wp-install you can then
   place the wp code for “The Loop” in the page.
 * It will output the same CSS tags as the wordpress install. Hope this leads you
   in the right direction. I use it to use the wp-theme on non wordpress pages.
 *  Thread Starter [ericksonstudio](https://wordpress.org/support/users/ericksonstudio/)
 * (@ericksonstudio)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673661)
 * Well, that didn’t work (using the wp-blog-header.php file). It looks like the
   server won’t let me `include` anything from the `/www` directory — not even a
   plain txt file.
 * Maybe a permissions issue?
 *  [Jeremy](https://wordpress.org/support/users/boilr/)
 * (@boilr)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673747)
 * i am interested in the same end result as ericksonstudio has requested help on.
   i have a feeling a lot of ipod touch/iphone owners who also own their own domain
   and use wordpress to blog would also like to make this happen. currently, the
   only other solution is to run a separate iphone-formatted theme via a plugin,
   BUT this does NOT work if you use wp-cache or the like.
 * is it possible, albeit cumbersome, to do a second wp install in the subdomain
   and “republish” or syndicate (rss) the latest 20 or so posts in the second install
   of the i-site?
 * either way, if anyone can help us solve this very desirable result, it would 
   be greatly appreciated!
 * [http://www.boilr.net](http://www.boilr.net)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Subdomain with Same Database Content?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [Jeremy](https://wordpress.org/support/users/boilr/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/subdomain-with-same-database-content/#post-673747)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
