Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a site, I'd like to create a subdomain of it for mobile presentation.

  1. Both websites will show the same posts and custom posts. (shared database)
  2. Each website will have different pages that will display those posts differently.

Because of #2, I can't just use a theme switcher, I really need to design an entirely new website from the ground up for mobile, but using a shared database.

How can I achieve this?

This seems to me such a basic question, but I can't find answers anywhere. All I get referenced to is Multisite (I'm not trying to create a network)and WP-Touch (might be useful, but I need more than just switching a theme).

Anyone know the steps needed? Any tutorials I've not found in my days of scouring the web for answers? As a side note, I've developed the main site with heavy usage of Toolets "Types & Views" and it's awesome. I have an incredibly complex main website. My goal is to create a very customized, stripped down version of that site for mobile.

Other thoughts:

I don't need to map page-for-page, since the pages on each site will be very different. I'll look to auto-detect for mobile and also allow switching between, but each time it can land on the requisite home pages. I just need to know how to connect 2 domains to 1 database.

share|improve this question
Why not just make the theme of the main site responsive so that it renders differently on mobile devices? –  Robert French Jan 14 at 18:36
Because I do not need just a responsive theme. I need a completely different architecture for getting in and out of the information presented on the site for a user on the go. –  imagefact Jan 14 at 22:17
Could you not still use a theme switcher (detecting for mobile user agents), and have separate navigation in Appearance Menus? Think: wp_nav_menu(array('menu'=>'mobile-menu')) - where these menu items are linking to separate pages that have been assigned your unique mobile-ready templates. I'd be happy to provide a more in depth answer if you think this would be sufficient. –  BODA82 Nov 17 at 18:43

1 Answer 1

Like Robert I would propose a responsive theme. Maybe you could make two different menus with the respective pages in WordPress and only display the respective menu in the mobile and the desktop theme?

share|improve this answer
In addition, WordPress has some browser sniffing functions you could implement if you're desperate, i.e. wp_is_mobile. codex.wordpress.org/Function_Reference/wp_is_mobile –  MikeNGarrett Jan 14 at 19:41
Thank you for your input! But I need a more robust solution than just a different menu. I truly need 2 different sites - but accessing the same database. Can this be done? –  imagefact Jan 14 at 22:21
Of course you can access the same database, but there will always the same pages (both, your mobile and your desktop version) in the admin. But maybe you don't need a different installation. You can use a plugin like Mobile Subdomain and maybe redirect the different pages with a rule like it's noted in this entry? –  Matthias Lehming Jan 15 at 19:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.