15 best PHP Database libraries in 2024

share link

by marketing.admin@openweaver.com dot icon Updated: Feb 14, 2023

technology logo
technology logo

Guide Kit Guide Kit  

The first thing to understand is that using a PHP database library like hasbids, monolog or medoo is not only an opportunity to cut development time. It also allows you to do things like load data from different sources, use caching and more. These libraries are mature and well-tested. They have been used by thousands of applications already, so there have been hundreds of millions of lines of code written for them. You can feel safe in your decisions about which library to use. Monolog is a simple logging library for PHP. It's intended to be used by developers who want to log HTTP requests, responses and exceptions that happen on their application. Monolog can be easily integrated into any project, allowing you to easily log your user's activity. Hasbids PHP database libraries are used for interacting with the eBay API to create/update auctions. Medoo PHP database libraries are used for interacting with the Amazon API to create/update products. Popular open source PHP database libraries for developers include

monologby Seldaek

PHP doticonstar image 20395 doticonVersion:3.3.1doticon
License: Permissive (MIT)

Sends your logs to files, sockets, inboxes, databases and various web services

Support
    Quality
      Security
        License
          Reuse

            monologby Seldaek

            PHP doticon star image 20395 doticonVersion:3.3.1doticon License: Permissive (MIT)

            Sends your logs to files, sockets, inboxes, databases and various web services
            Support
              Quality
                Security
                  License
                    Reuse

                      dbalby doctrine

                      PHP doticonstar image 9087 doticonVersion:3.6.3doticon
                      License: Permissive (MIT)

                      Doctrine Database Abstraction Layer

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                dbalby doctrine

                                PHP doticon star image 9087 doticonVersion:3.6.3doticon License: Permissive (MIT)

                                Doctrine Database Abstraction Layer
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          hashidsby vinkla

                                          PHP doticonstar image 4992 doticonVersion:5.0.2doticon
                                          License: Permissive (MIT)

                                          A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    hashidsby vinkla

                                                    PHP doticon star image 4992 doticonVersion:5.0.2doticon License: Permissive (MIT)

                                                    A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              Medooby catfan

                                                              PHP doticonstar image 4676 doticonVersion:v2.1.9doticon
                                                              License: Permissive (MIT)

                                                              The lightweight PHP database framework to accelerate the development.

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        Medooby catfan

                                                                        PHP doticon star image 4676 doticonVersion:v2.1.9doticon License: Permissive (MIT)

                                                                        The lightweight PHP database framework to accelerate the development.
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  migrationsby doctrine

                                                                                  PHP doticonstar image 4534 doticonVersion:3.6.0doticon
                                                                                  License: Permissive (MIT)

                                                                                  Doctrine Database Migrations Library

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            migrationsby doctrine

                                                                                            PHP doticon star image 4534 doticonVersion:3.6.0doticon License: Permissive (MIT)

                                                                                            Doctrine Database Migrations Library
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      phinxby cakephp

                                                                                                      PHP doticonstar image 4348 doticonVersion:0.13.4doticon
                                                                                                      License: Permissive (MIT)

                                                                                                      PHP Database Migrations for Everyone

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                phinxby cakephp

                                                                                                                PHP doticon star image 4348 doticonVersion:0.13.4doticon License: Permissive (MIT)

                                                                                                                PHP Database Migrations for Everyone
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          Search-Replace-DBby interconnectit

                                                                                                                          PHP doticonstar image 3880 doticonVersion:4.1.2doticon
                                                                                                                          License: Strong Copyleft (GPL-3.0)

                                                                                                                          This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    Search-Replace-DBby interconnectit

                                                                                                                                    PHP doticon star image 3880 doticonVersion:4.1.2doticon License: Strong Copyleft (GPL-3.0)

                                                                                                                                    This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              php-crud-apiby mevdschee

                                                                                                                                              PHP doticonstar image 3341 doticonVersion:v2.14.19doticon
                                                                                                                                              License: Permissive (MIT)

                                                                                                                                              Single file PHP script that adds a REST API to a SQL database

                                                                                                                                              Support
                                                                                                                                                Quality
                                                                                                                                                  Security
                                                                                                                                                    License
                                                                                                                                                      Reuse

                                                                                                                                                        php-crud-apiby mevdschee

                                                                                                                                                        PHP doticon star image 3341 doticonVersion:v2.14.19doticon License: Permissive (MIT)

                                                                                                                                                        Single file PHP script that adds a REST API to a SQL database
                                                                                                                                                        Support
                                                                                                                                                          Quality
                                                                                                                                                            Security
                                                                                                                                                              License
                                                                                                                                                                Reuse
                                                                                                                                                                  PHP doticonstar image 3162 doticonVersion:v2.9.3doticon
                                                                                                                                                                  License: Others (Non-SPDX)

                                                                                                                                                                  Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.

                                                                                                                                                                  Support
                                                                                                                                                                    Quality
                                                                                                                                                                      Security
                                                                                                                                                                        License
                                                                                                                                                                          Reuse

                                                                                                                                                                            PHP-MySQLi-Database-Classby ThingEngineer

                                                                                                                                                                            PHP doticon star image 3162 doticonVersion:v2.9.3doticon License: Others (Non-SPDX)

                                                                                                                                                                            Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
                                                                                                                                                                            Support
                                                                                                                                                                              Quality
                                                                                                                                                                                Security
                                                                                                                                                                                  License
                                                                                                                                                                                    Reuse
                                                                                                                                                                                      PHP doticonstar image 5022 doticonVersion:v1.9doticon
                                                                                                                                                                                      License: Strong Copyleft (ODbL-1.0)

                                                                                                                                                                                      🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities

                                                                                                                                                                                      Support
                                                                                                                                                                                        Quality
                                                                                                                                                                                          Security
                                                                                                                                                                                            License
                                                                                                                                                                                              Reuse

                                                                                                                                                                                                countries-states-cities-databaseby dr5hn

                                                                                                                                                                                                PHP doticon star image 5022 doticonVersion:v1.9doticon License: Strong Copyleft (ODbL-1.0)

                                                                                                                                                                                                🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities
                                                                                                                                                                                                Support
                                                                                                                                                                                                  Quality
                                                                                                                                                                                                    Security
                                                                                                                                                                                                      License
                                                                                                                                                                                                        Reuse

                                                                                                                                                                                                          phpbuby sebastianfeldmann

                                                                                                                                                                                                          PHP doticonstar image 1235 doticonVersion:6.0.15doticon
                                                                                                                                                                                                          License: Others (Non-SPDX)

                                                                                                                                                                                                          PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process

                                                                                                                                                                                                          Support
                                                                                                                                                                                                            Quality
                                                                                                                                                                                                              Security
                                                                                                                                                                                                                License
                                                                                                                                                                                                                  Reuse

                                                                                                                                                                                                                    phpbuby sebastianfeldmann

                                                                                                                                                                                                                    PHP doticon star image 1235 doticonVersion:6.0.15doticon License: Others (Non-SPDX)

                                                                                                                                                                                                                    PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process
                                                                                                                                                                                                                    Support
                                                                                                                                                                                                                      Quality
                                                                                                                                                                                                                        Security
                                                                                                                                                                                                                          License
                                                                                                                                                                                                                            Reuse

                                                                                                                                                                                                                              db-dumperby spatie

                                                                                                                                                                                                                              PHP doticonstar image 912 doticonVersion:3.3.0doticon
                                                                                                                                                                                                                              License: Permissive (MIT)

                                                                                                                                                                                                                              Dump the contents of a database

                                                                                                                                                                                                                              Support
                                                                                                                                                                                                                                Quality
                                                                                                                                                                                                                                  Security
                                                                                                                                                                                                                                    License
                                                                                                                                                                                                                                      Reuse

                                                                                                                                                                                                                                        db-dumperby spatie

                                                                                                                                                                                                                                        PHP doticon star image 912 doticonVersion:3.3.0doticon License: Permissive (MIT)

                                                                                                                                                                                                                                        Dump the contents of a database
                                                                                                                                                                                                                                        Support
                                                                                                                                                                                                                                          Quality
                                                                                                                                                                                                                                            Security
                                                                                                                                                                                                                                              License
                                                                                                                                                                                                                                                Reuse
                                                                                                                                                                                                                                                  PHP doticonstar image 608 doticonVersion:v1.11.0doticon
                                                                                                                                                                                                                                                  License: Permissive (Apache-2.0)

                                                                                                                                                                                                                                                  PHP Reader for the MaxMind DB Database Format

                                                                                                                                                                                                                                                  Support
                                                                                                                                                                                                                                                    Quality
                                                                                                                                                                                                                                                      Security
                                                                                                                                                                                                                                                        License
                                                                                                                                                                                                                                                          Reuse

                                                                                                                                                                                                                                                            MaxMind-DB-Reader-phpby maxmind

                                                                                                                                                                                                                                                            PHP doticon star image 608 doticonVersion:v1.11.0doticon License: Permissive (Apache-2.0)

                                                                                                                                                                                                                                                            PHP Reader for the MaxMind DB Database Format
                                                                                                                                                                                                                                                            Support
                                                                                                                                                                                                                                                              Quality
                                                                                                                                                                                                                                                                Security
                                                                                                                                                                                                                                                                  License
                                                                                                                                                                                                                                                                    Reuse

                                                                                                                                                                                                                                                                      Lazer-Databaseby Lazer-Database

                                                                                                                                                                                                                                                                      PHP doticonstar image 256 doticonVersion:2.0.0doticon
                                                                                                                                                                                                                                                                      License: Permissive (MIT)

                                                                                                                                                                                                                                                                      PHP flat file database to store data with JSON

                                                                                                                                                                                                                                                                      Support
                                                                                                                                                                                                                                                                        Quality
                                                                                                                                                                                                                                                                          Security
                                                                                                                                                                                                                                                                            License
                                                                                                                                                                                                                                                                              Reuse

                                                                                                                                                                                                                                                                                Lazer-Databaseby Lazer-Database

                                                                                                                                                                                                                                                                                PHP doticon star image 256 doticonVersion:2.0.0doticon License: Permissive (MIT)

                                                                                                                                                                                                                                                                                PHP flat file database to store data with JSON
                                                                                                                                                                                                                                                                                Support
                                                                                                                                                                                                                                                                                  Quality
                                                                                                                                                                                                                                                                                    Security
                                                                                                                                                                                                                                                                                      License
                                                                                                                                                                                                                                                                                        Reuse
                                                                                                                                                                                                                                                                                          PHP doticonstar image 233 doticonVersion:2.10.36doticon
                                                                                                                                                                                                                                                                                          License: Strong Copyleft (GPL-3.0)

                                                                                                                                                                                                                                                                                          CFDB - WordPress plugin to save form submissions into a database

                                                                                                                                                                                                                                                                                          Support
                                                                                                                                                                                                                                                                                            Quality
                                                                                                                                                                                                                                                                                              Security
                                                                                                                                                                                                                                                                                                License
                                                                                                                                                                                                                                                                                                  Reuse

                                                                                                                                                                                                                                                                                                    contact-form-7-to-database-extensionby mdsimpson

                                                                                                                                                                                                                                                                                                    PHP doticon star image 233 doticonVersion:2.10.36doticon License: Strong Copyleft (GPL-3.0)

                                                                                                                                                                                                                                                                                                    CFDB - WordPress plugin to save form submissions into a database
                                                                                                                                                                                                                                                                                                    Support
                                                                                                                                                                                                                                                                                                      Quality
                                                                                                                                                                                                                                                                                                        Security
                                                                                                                                                                                                                                                                                                          License
                                                                                                                                                                                                                                                                                                            Reuse

                                                                                                                                                                                                                                                                                                              See similar Kits and Libraries