The Power ORM


RedBeanPHP is an easy to use ORM for PHP. It's a Zero Config ORM lib that 'automagically' builds your database schema.

IMPORTANT! RedBeanPHP 3.5 is approaching EOL status!

After 1 October, RedBeanPHP 3.5 will no longer be supported nor maintained !
If you want to continue to use a maintained version of RedBeanPHP, upgrade to version 4.3!
UPDATE: Due to popular demand, support has been extended until December 2016

RedBeanPHP 4.3.2 is out!

This release includes some useful improvements including terminal colors in 'fancy' debug mode (don't worry classic debug is still available and the default!). In 'fancy' mode schema altering queries are highlighted as well as bound parameters. Parameter bindings are also included in the SQL instead of in a separate list. If a parameter value is too long, fancy debug will only show the first part so your query remains readable. Also, fancy debug works with HTML colors as well, in case you like to debug with a browser instead of a command line.

debugging has never been this colourful!


: RB 3.5 support has been extended until December 2016
: RedBeanPHP 4.3.2 has arrived !
: RedBeanPHP 4.3.1 has been released!
: RedBeanPHP 4.3 has been released!
: RedBeanPHP 4.3 beta 2 has been released!
: RedBeanPHP 4.3 Beta 1 has been released!
: RedBeanPHP 4.2.5 has been released!

Code Example

This is how you do CRUD in RedBeanPHP:

    require 'rb.php';
R::setAutoResolveTRUE );        //Recommended as of version 4.2
$post R::dispense'post' );
$post->text 'Hello World';

$id R::store$post );          //Create or Update
$post R::load'post'$id );   //Retrieve
R::trash$post );                //Delete

This automatically generates the database, tables and columns... on-the-fly. It infers relations based on naming conventions. RedBeanPHP is written by BDFL Gabor de Mooij and the RedBeanPHP community.

Zero Config

No verbose XML files, no annoying annotations, no YAML or INI. Zero Config. Just start coding.

Fluid Schema

During development, RedBeanPHP will adapt the database schema to fit your needs, giving you the NoSQL experience. When deploying to production servers, you can freeze the schema and benefit from performance gains and referential integrity.
RedBeanPHP offers the best of both worlds!


RedBeanPHP is a compact library yet packed with features: auto-discovery of models, deep copying and smart import features will boost your productivity!
Write less, do more!


RedBeanPHP strives to support all ALL Free, Open Source databases.
Currently, RedBeanPHP supports: MySQL, MariaDB, SQLite, PostgreSQL and CUBRID.


Download the easy-to-use one-in-all package, one single file containing the entire RedBeanPHP library! No composer, no auto-loaders, no configuration, just download and run! Go to the download page and download to latest version of RedBeanPHP!


RedBeanPHP Easy ORM for PHP © 2016 () and the RedBeanPHP community () - Licensed New BSD/GPLv2 - RedBeanPHP Archives