Adminer

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB.


Note

Uberspace provides instances of Adminer and phpMyAdmin for everybody to use. Therefore this guide is mainly for people who would like to customize Adminer to their needs.

License

Adminer is released under Apache License 2.0 or GPL 2.

Installation (with Plugin Support)

Check the current version of Adminer at GitHub and cd the your DocumentRoot:

[isabell@stardust ~]$ VERSION=4.8.1
[isabell@stardust ~]$ cd ~/html
[isabell@stardust html]$ wget -O adminer.php https://github.com/vrana/adminer/releases/download/v$VERSION/adminer-$VERSION.php
[isabell@stardust html]$ mkdir -p plugins
[isabell@stardust html]$ wget -O plugins/plugin.php https://raw.githubusercontent.com/vrana/adminer/master/plugins/plugin.php
[isabell@stardust html]$

Create an index.php file in the same directory:

<?php

function adminer_object() {
  foreach (glob("plugins/*.php") as $filename) {
    include_once "./$filename";
  }

  $plugins = array(
    // ...
  );

  return new AdminerPlugin($plugins);
}

include "./adminer.php";

This will include all plugins located in the plugins folder. To use a plugin you also need to initialize it inside the $plugins array.

You can find a list of available Plugins here.

Example Plugin: Themes

[isabell@stardust html]$ THEME_VERSION=1.7
[isabell@stardust html]$ wget -O theme.zip https://github.com/pematon/adminer-theme/archive/v$THEME_VERSION.zip
[isabell@stardust html]$ unzip -o theme.zip
[isabell@stardust html]$ cp -r adminer-theme-$THEME_VERSION/lib/* .
[isabell@stardust html]$ rm -rf theme.zip adminer-theme-$THEME_VERSION
[isabell@stardust html]$

Update the index.php to include the new Plugin:

<?php

function adminer_object() {
  foreach (glob("plugins/*.php") as $filename) {
    include_once "./$filename";
  }

  $plugins = array(
    new AdminerTheme("default-orange")
  );

  return new AdminerPlugin($plugins);
}

include "./adminer.php";

Updates

Just repeat the installation steps with the new VERSION.


Tested with Adminer 4.8.1, Uberspace 7.13.0, and PHP 8.1

Written by: Nikolas <https://nikolasdas.de>