WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Takayuki Miyauchi v1.8.2

Nginx Mobile Theme

This plugin allows you to switch theme according to the User Agent on the Nginx reverse proxy.

Nginx Mobile Theme

The facts

Rating
5★ from 2
Active installs
200+
Price
Free
Last updated
17 Oct 2018
Added
Nov 2013
Requires WP
3.7.1
Tested up to
WP 4.9.31
Downloads
239,517

Our analysis

AI-assisted

Nginx Mobile Theme is a WordPress plugin that enables you to switch themes based on the User Agent when using an Nginx reverse proxy. It allows for automatic cache flushing for mobile and desktop versions through the Nginx Cache Controller and supports customization for multiple mobile devices via filter hooks.

This plugin is suitable for WordPress users who want to optimize their site’s mobile experience by serving different themes to mobile users. It requires specific configurations in the Nginx server to function correctly.

Best for: WordPress users running Nginx who want to enhance mobile site performance.

What it does well

  • Allows theme switching based on User Agent
  • Supports automatic cache flushing for mobile and desktop
  • Customizable for multiple mobile devices

Where it falls short

  • Requires Nginx and specific server configurations
  • Limited documentation on usage and setup

Verdict

Nginx Mobile Theme provides a straightforward solution for serving different themes to mobile users, but it requires technical knowledge for proper setup and configuration.

From the developer

Takayuki Miyauchi's own description of Nginx Mobile Theme, lightly tidied.

This plugin allows you to switch theme according to the User Agent on the Nginx reverse proxy.

Nginx Mobile Theme’s requirements are as follows.

Some Features

  • You can flush mobile’s and pc’s each caches automatically via Nginx Cache Controller.
  • Allow you to switch theme according to the user-agent.
  • Allow you to customize multiple mobile device support via filter-hook.

Nginx Configuration

Add mobile device detection to the nginx.conf.

set $mobile '';
if ($http_user_agent ~* '(iPhone|iPod|incognito|webmate|Android|dream|CUPCAKE|froyo|BlackBerry|webOS|s8000|bada|IEMobile|Googlebot\-Mobile|AdsBot\-Google)') {
    set $mobile "@smartphone";
}

Set proxy_cache_key.

proxy_cache_key "$mobile$scheme://$host$request_uri";

Send custom request header to the backend.

proxy_set_header X-UA-Detect $mobile;

Nginx Mobile Theme will switch theme when ‘@smartphone’ is received in the $_SERVER['HTTP_X_UA_DETECT'].

How to use

  1. Please access to the theme-customizer in the WordPress admin area.
  2. Please select Mobile Theme in the drop-down.
  3. Click “Save & Publish” button to save.

Multiple mobile device support

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for making sites fast.

WP-Optimize

Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...

Free 1M+ installs 4.8★ (2,606)
LiteSpeed Cache

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

Free 7M+ installs 4.8★ (2,764)
EWWW Image Optimizer

Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faste...

Free 1M+ installs 4.8★ (1,838)
Under Construction

Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & sh...

Free 600k+ installs 4.8★ (1,285)
Smush

Smush

93

Compress and optimize images, enable lazy load, serve WebP & AVIF, and speed up your site with a global im...

Free 1M+ installs 4.8★ (6,051)
Converter for Media

Speed up your website by using our WebP & AVIF Converter. Optimize images and serve WebP and AVIF images i...

Free 500k+ installs 4.9★ (1,097)