Adminer - Database management in a single PHP file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Peter Knut 81e337bed1 Release 4.11 9 months ago
.github Enable CodeQL Analysis 5 years ago
adminer Release 4.11 9 months ago
bin Add script for exporting compiled adminer variants 11 months ago
designs Replace deprecated <acronym> with <abbr> 11 months ago
editor Clean up JS code 9 months ago
plugins Clean up JS code 9 months ago
tests Update tests 5 years ago
.editorconfig Add .editorconfig file 11 months ago
.gitignore Add script for exporting compiled adminer variants 11 months ago
.gitmodules Move dependencies from submodules to Composer 1 year ago
.travis.yml Travis: add php 7.4 && 8.0 5 years ago
CHANGELOG.md Release 4.11 9 months ago
LICENSE.md Update project information 9 months ago
Makefile Add basic Makefile. 5 years ago
README.md Update information files 9 months ago
SECURITY.md Update information files 9 months ago
compile.php Devel: Add modification time to CSS and JS links for easier development 9 months ago
composer.json Switch to custom JUSH library 9 months ago
coverage.php Remove deprecated HTML table parameters 9 months ago
lang.php Add support for translations in plugins 11 months ago
todo.txt Skip dump of generated columns 11 months ago

README.md

Adminer

Adminer is a full-featured database management tool written in PHP. It consists of a single file ready to deploy to the target server. As a companion, Adminer Editor offers data manipulation for end-users.

Supported database drivers:

  • MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, MongoDB
  • With plugin: SimpleDB, Elasticsearch (beta), Firebird (alpha), ClickHouse (alpha)

Requirements

  • PHP 5.6+ with enabled sessions.

Migration from original Adminer

No action is needed for now. But please, read 👉 What to expect section before you decide to switch to this project.

Usage

Download one for the latest release files, upload to the HTTP server with PHP and enjoy 😉 If you are not satisfied with any combination of the database driver and language, you can download the source code and compile your own Adminer:

  • Download the source code.
  • Run composer install to install dependencies.
  • Run compile.php:
# Adminer
php compile.php <driver> <language>

# Editor
php compile.php editor <driver> <language>

For example:

php compile.php pgsql cs

Available drivers, languages.

Security

Adminer does not allow connecting to databases without a password and it rate-limits the connection attempts to protect against brute-force attacks. Still, it is highly recommended to 🔒 restrict access to Adminer 🔒 by whitelisting IP addresses allowed to connect to it, by password-protecting the access in your web server or by enabling security plugins (e.g. to require an OTP).

Plugins

  • Download plugins you want and place them into the plugins folder.
  • Create index.php file specifying which plugins do you want to use.

File structure will be:

- plugins
    - drivers
        - elastic.php
    - dump-xml.php
    - tinymce.php
    - file-upload.php
    - ...
- adminer.php
- index.php

Index.php:

<?php
function adminer_object() {
    // Required to run any plugin.
    include_once "./plugins/plugin.php";
    
    // Autoloader.
    foreach (glob("plugins/*.php") as $filename) {
        include_once "./$filename";
    }
    
    // Enable extra drivers just by including them.
    include_once "./plugins/drivers/elastic.php";
    
    // Specify enabled plugins.
    $plugins = [
        new AdminerDumpXml(),
        new AdminerTinymce(),
        new AdminerFileUpload("data/"),
        // ...
    ];
    
    // It is possible to combine customization and plugins.
    // class AdminerCustomization extends AdminerPlugin {
    // }
    // return new AdminerCustomization($plugins);
    
    return new AdminerPlugin($plugins);
}

// Include original Adminer or Adminer Editor.
include "./adminer.php";

Available plugins.

Main project files

  • adminer/index.php - Run development version of Adminer.
  • editor/index.php - Run development version of Adminer Editor.
  • editor/example.php - Example customization.
  • plugins/readme.txt - Plugins for Adminer and Adminer Editor.
  • adminer/plugin.php - Plugin demo.
  • adminer/sqlite.php - Development version of Adminer with SQLite allowed.
  • editor/sqlite.php - Development version of Editor with SQLite allowed.
  • adminer/designs.php - Development version of Adminer with adminer.css switcher.
  • compile.php - Create a single file version.
  • lang.php - Update translations.
  • tests/katalon.html - Katalon Automation Recorder test suite.

Project history

Adminer was originally developed by Jakub Vrana, and it can be still found on official pages. Unfortunately, it is not maintained for several years. In the meantime, I (@peterpp) created for my company a set of custom plugins, modern theme, fixed some bugs and practically rewrote the Elasticsearch driver. I also looked closely and contributed to the AdminerEvo project that looked promising. However, I finally decided to continue working on this fork and fulfill my own vision.

What to expect

Our top priority is fixing the security issues and reported bugs. But we really want to move forward and transform Adminer to a tool that will keep its simplicity, yet looks much better, is even easier to use and can be configured without requirement of additional plugins.

Version 4.x

Original design and backward compatibility is kept. Many issues were fixed, and we introduced several functional and UI improvements.

Version 5

Bridges will be burned 🔥🔥🔥. It's in development already, so you can check what's going on. Or you can become the early adopter and help us with testing 😉

Our goals are:

  • Requirements - Bump minimal PHP to 7.1, maybe even higher.
  • Themes – Modernize the current old-school theme, add new default theme based on our Adminer theme, support dark mode, configurable color variants for production/devel environment. All current designs will be removed.
  • Plugins - Integrate several basic plugins, enable them by optional configuration.
  • Codebase - Prefer code readability before minimalism, use PER coding style, add namespaces.
  • Compilation - Allow to export selected drivers, themes, languages and plugins into a single adminer.php file.

We are also thinking to change the project's name, so people will clearly distinguish between original Adminer and other forks. Any suggestions are welcome.