How to install WordPress without using the /wp-admin/install.php script?

I am trying to create a system that will install WordPress without any browser interaction like-

  • I will create a database
  • I will upload/create WordPress required database tables manually (I have installed a WordPress normally then collect the database tables and imported them into database).
  • I will create a wp-config.php manually and fill it with necessary information what it requires(database name,username,password,Authentication Unique Keys etc).

Now problem is after done this process I ended up on here - It redirects me on domain.com/wp-admin/install.php.

How to achieve install WordPress without any interaction from user,completely automatically?

Note: I am actually trying to install WordPress on behalf of my users when they would register on my platform it will install a WordPress on their wildcard subdomain automatically which I don't want to let them touch any part of WordPress installation


Solution 1:

You can use the wp command to perform an installation of WordPress.

Use the command wp core download to download the latest version of WordPress, and wp core install or wp core multisite-install to install WordPress using the name, email and database credentials you supply.

See the documentation for wp core for more details.