Title: Multiple WordPress sites, same tables/databases
Last modified: August 20, 2016

---

# Multiple WordPress sites, same tables/databases

 *  [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/)
 * Hi guys,
 * First post and relatively new user to WordPress! The site I’m talking about is
   [EntertainmentCocktail.com](http://www.entertainmentcocktail.com) which I’m currently
   getting off the ground.
 * What I’m trying to accomplish is to have a subdirectory for each category (for
   example, film.entertainmentcocktail.com) and for each to have their own edited
   version of the theme (with, say, introduction, slightly changed layout and only
   category-oriented posts).
 * What I’m asking is: **is there a way to have multiple WordPress installations
   on a domain that uses not just the same database but the same tables?**
 * This way I can tweak the theme’s files to show specifically that category’s posts
   and their own specific genre-oriented theme.
 * Also, all the users and posts will be echoed exactly on all sections of the site–
   the main and the three branches – and of course each section will update as per
   a regular WordPress site.
 * I have only been able to find ways to have multiple installations with different
   tables (useless for my purposes).
 * Please help!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321528)
 * [http://codex.wordpress.org/Create_A_Network](http://codex.wordpress.org/Create_A_Network)?
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321530)
 * Thank you for that massively quick reply!
 * I wasn’t aware MultiSite works all from the same tables? I thought it was just
   for having multiple defined WordPress installations on the same domain?
 * Will take a good look, thanks again Esmi!
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321538)
 * I’ve had a look, it just seems like having multiple unique blogs.
 * As a user experience, I’m aiming for the readers to not realise they have left
   the original site, and when they are sent to the different sections they only
   have subtle changes that identify them. All the user details and post details
   remain unchanged.
 * This means that the main website will have ALL the posts, while each separate
   section will have their own category-specific posts (defined by editing the theme
   files).
 * If this **is** possible using WordPress MS, how would I go about doing that, 
   or is it automated in the MS install?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321553)
 * You can use a single install and use categories but you can’t have the (sub)domain
   names you want.
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321557)
 * Or subfolders? It’s irrelevant where they are, I just want effectively different
   installs on the same domain with the same database, user data, post information
   etc. They don’t have to be in subdomains, it’s just so I can customize the themes
   per category and effectively have a site per category all linked up to the main
   site which is an amalgamation of all three.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321565)
 * > Or subfolders?
 * No – you cannot have true sub-folders in a single install. The best you can have
   is a [permalink structure](http://codex.wordpress.org/Using_Permalinks) that 
   resembles sub-folders.
 * Only WP Multisite uses sub-folders or sub-domains.
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321567)
 * So is there any way of achieving what I’m after?
 * Even if it’s just a page, would I just need to create a .php template/page and
   add it as a link that is effectively a hub for all the posts of a category, as
   well as having it’s own theme by loading a separate CSS file?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321574)
 * > So is there any way of achieving what I’m after?
 * I think you’re going to have to prioritise your needs first to determine which
   flavour of WordPress is best for you. If a sub-domain structure is important,
   then you’ll have to use WP Multisite. If a single theme/single dashboard approach
   is best for you, then drop the sub-domain idea and go for a single, =vanilla,
   WordPress install.
 * The rest of your questions really hinge on what WP flavour you opt for.
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321584)
 * Definitely more important that they all contain the same data from the same database
   and tables, so I’m happy to sacrifice the subdomain restructure idea.
 * As it stands, going back to my original question (now slightly rephrased), if
   I wanted to have three new pages – “Movies”, “Gaming” and “Music”, each with 
   their own riff on the original theme, would it be as simple as coding a new stylesheet
   and PHP pages linking to the database and adding them as links on the original
   site or is there something more complicated that I’d have to do?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321697)
 * > would it be as simple as coding a new stylesheet and PHP pages linking to the
   > database
 * Even simpler. You could [create a custom template](http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates)
   for each Page and, if necessary, turn it in a [page of posts](http://codex.wordpress.org/Pages#A_Page_of_Posts).
   Or you could just use [category templates](http://codex.wordpress.org/Category_Templates)
   to display all posts in those categories.
 * Either way, if your theme uses [the body_class() function](http://codex.wordpress.org/Function_Reference/body_class)(
   and most themes in the [Theme Repo](http://wordpress.org/extend/themes/) that
   have been updated in the last 14 months do), that will give you the CSS hooks
   to completely re-style the pages using pure CSS added to the theme’s stylesheet(
   s). Finally, [a custom menu](http://codex.wordpress.org/Appearance_Menus_SubPanel)
   will you to build your own nav menus.
 *  Thread Starter [magicwings](https://wordpress.org/support/users/magicwings/)
 * (@magicwings)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321704)
 * Thank you so much for your help esmi, I’m well on my way to getting it finished
   🙂
 * Currently it’s up at [EntertainmentCocktail.com/movies](http://www.entertainmentcocktail.com/movies/),
   but there’s still one thing that isn’t working for me:
 * As you can probably see, I’m trying to have a list of “Recent Film News” on the
   left underneath the recent reviews box. I’ve managed to include exclusively movie-
   category news, but for some reason it wont limit it to just 8 articles.
 * My code for that section:
 *     ```
       <ul class="list2">
   
       <?php global $latestnews;
   
       $args = array(
           'numberposts'     => 5,
           'category'        => 3,
           'orderby'         => 'post_date',
           'order'           => 'DESC',
           'post_type'       => 'post',
           'post_status'     => 'publish' );
   
       $latestnews = get_posts($args);
       ?>
   
       <?php foreach ($latestnews as $post) : setup_postdata($post); { ?>
   
       	<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
   
       <?php } endforeach; ?> </ul>
       ```
   
 * As you can see, I’ve made sure to use the `numberposts` tag in the array (set
   to 5 so I can clearly see a difference when it’s working!) but on the website
   it’s showing all 9 (current) articles.
 * What’s going wrong?!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321713)
 * Shall we stick to just 1 topic at a time?
    [http://wordpress.org/support/topic/fatal-error-387?replies=4](http://wordpress.org/support/topic/fatal-error-387?replies=4)

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

The topic ‘Multiple WordPress sites, same tables/databases’ is closed to new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [multiple](https://wordpress.org/support/topic-tag/multiple/)
 * [tables](https://wordpress.org/support/topic-tag/tables/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-wordpress-sites-same-tablesdatabases/#post-2321713)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
