Good response from @FReNeTiC. I would, however, like to add a few pointers on how to do a auto-install .
Main configuration file
Like Wordpress, you will need a basic file configuration that works independently of the database. Usually the file will contain the database access information, directory notes, and main language.
Sometimes it is possible that the file is automatically created through an installation screen. You make a screen with the necessary data, the user completes the form and you save the file in the correct place.
But, unfortunately, this is not always possible, because in some hosting you can not write to the file system and / or do not want to give written permission to the scripts. In this case, do as Wordpress: show the configuration file on the screen and ask the user to create a file on the server with the content displayed.
Database Migrations
How much of the database. There are some frameworks for bank migrations, such as:
-
Ruckusing Migrations : follows the philosophy of RoR (Ruby on Rails). Changes to the database are made via PHP code. Supports MySQL and PostgreSQL.
-
Doctrine Migrations : changes are specified in XML. The Doctrine project supports MySQL, PostgreSQL, SQL Server, Oracle and others, but I do not know if migrations work well on all of them.
-
Phinx: Simple PHP Database Migrations : provides another API for migrations via PHP code. See more documentation here . Supports MySQL, PostgreSQL and SQLite.
Whether you choose any of these, some other, or even create another "nail" solution, it's important to define a method so that your database can always be upgraded to the most current version when your system runs.
Considerations
Creating a self-installing system is something that can be achieved without many problems.
On the other hand, managing updates in the system life cycle can be tricky. In addition, an installation with excellent usability, intuitive and friendly as Wordpress is something that requires effort.
Remember that WP is an already very traditional system that has been evolving over the years. They know the main problems that occur in different environments and have know-how to do several environmental checks in advance, in order to anticipate possible problems. So do not expect such a good result right away.