A
A
Anton2020-07-23 14:01:04
Mobile development
Anton, 2020-07-23 14:01:04

How to implement a mobile version of WordPress on a subdomain?

How to implement a mobile version of a WordPress site on the m.site.ru subdomain?

Links to plugins are not of interest, I need to do it manually so that the same permalinks are. Which way should I look? Maybe there are code examples?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dima, 2020-07-23
Dolgoter @SpiderPigAndCat

making a subdomain. the main and subdomain have the same access to the database, so you just transfer the files to the subdomain version and change the layout a little. and why would you? adaptive layout is alive

L
Lord_Dantes, 2020-07-23
@Lord_Dantes

You connect a subdomain like a regular site, and instead of layout, you make a mobile version.
From the main site, you check for a mobile device ( link ), and you do a redirect.

E
EvgenyMorozov, 2020-07-24
@EvgenyMorozov

If you want PWA, then it will be on react or view, respectively, you do not need another instance of WordPress on a subdomain, you will still access the main WordPress through the API.
So the steps are:

  • Setting DNS on m.example.com
  • Setting up a web server (apache or nginx) to work with m.example.com
  • Application development locally
  • Deploy the app to m.example.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question