I have a main domain https://www.jaytech.com.ng and I also have a subdomain https://m.jaytech.com.ng

I want both the domains to use the same database when visited. I've tried using Multisite but it isn't working.

Any ideas on how to do this?

  • you mean use the same exact data? or the same database but different data? – David Lee Feb 19 '17 at 17:33
  • I mean using same database and data... – Vicky Jane Feb 19 '17 at 19:44
  • I.e the both displaying the same posts from a database – Vicky Jane Feb 19 '17 at 19:45

You cant have 2 sites that uses the same data from the same database, because of how WordPress works (permalinks etc), i am guessing you want to do this to show 2 different themes, 1 for the desktop version and 1 for the mobile version, try doing that with 1 WordPress installation and change the theme based on the device with a detecting class either from a plugin or make one.

I recommend you to use a stylesheet instead of having 2 themes.

  • That would not be possible for separate installations using the same database. Wordpress stores the the links for pages/post to the database. In this case, clicking any posts/pages in the m.jaytech would be redirected to the original domain jaytech in which the database initially belongs. – Den Isahac Feb 19 '17 at 17:27
  • true, permalinks, i will update the answer – David Lee Feb 19 '17 at 17:32
  • Okay, I also tried using .htaccess to redirect it, but did not work also – Vicky Jane Feb 19 '17 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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