special sponsors

# Add Themes to phpMyAdmin 4.x

Written by: Jace Bennest Jace Bennest
Guide Tested: Yes

phpMyAdmin (opens new window) is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. See the lando docs (opens new window) regarding phpMyAdmin for help enabling the service.

Only for PhpMyAdmin 4.x

Note that this guide is only applicable to the 4.x branch of PhpMyAdmin. You'll want to consult the docs for how to do this in 5.x

This is a basic setup to help you enable extra themes.

# Getting Started

Add the build script to your Lando recipe where you should have the phpMyAdmin service already.

    type: phpmyadmin:4.7
      - chmod +x /app/.lando/pma-theme.sh
      - /app/.lando/pma-theme.sh

# Create script to download and install the third-party theme

Create the custom pma-theme.sh file.

touch .lando/pma-theme.sh
vim .lando/pma-theme.sh

The location of this file is arbitrary. We placed it inside .lando/ folder simply because we find it convenient.

if [ ! -z $LANDO_MOUNT ]; then
  wget https://files.phpmyadmin.net/themes/pmaterial/1.1/pmaterial-1.1.zip
  unzip pmaterial-1.1.zip -d /www/themes/
  rm pmaterial-1.1.zip

Checkout the available themes here (opens new window). Make sure you choose a theme compatible with your version of phpMyAdmin. Modify the script according to the theme you want.

# Set new theme as the default

Review the phpMyAdmin docs (opens new window) to see how to hook up your config file.

Add this line to your config:


  // Set whichever theme you have available here.
  $cfg['ThemeDefault'] = 'pmaterial';


# Rebuild your environment

lando rebuild -y


Check the output from lando or run lando info to get the url for the phpMyAdmin service.


If you are interested in checking out the fully-armed and operational source code for this guide then check out this repo here.

Have a Lando question you'd like to see as a guide? Suggest one!
Want to write a Lando guide? Learn how!