<p>There are several ways you could approach this.  There is a <a href="https://github.com/mattstauffer/makeItCraft" rel="nofollow">bash script</a> that automates downloading the latest version of Craft, but it doesn't do the actual installation.</p>

<p>What I would do is create a PHP script that used prompted to accept Craft's license agreement, then used cURL/wget to download and extract the files.  You could prompt for all the information you need for installation (username, password, database, database connection info, etc.), then the script would load Craft's <code>craft/app/bootstrap.php</code> and call Craft's <a href="https://craftcms.com/classreference/services/InstallService#run-detail" rel="nofollow"><code>InstallService-&gt;run()</code></a> method passing in the necessary values similar to how Craft's <code>craft/app/controller/InstallController</code> does.</p>

CC BY-SA 3.0
2016-03-19T22:35:46.537Z
Thanks a lot! I already solved the downloading unpacking and so on but so far the installation was sort of a mystery to me :D I give your idea a shot and will reply when I´m finished :)
Ferdinand Grüner
CC BY-SA 3.0
2016-03-21T16:39:24.367Z
It worked perfectly fine! Sometime I still get some errors because of the craft_assets table being already created, but I´m sure I´m able to fix that.
Ferdinand Grüner
CC BY-SA 3.0
2016-03-21T19:46:01.837Z
You'll just want to make sure you're starting from a completely empty database (no tables at all) before running it.
Brad Bell
CC BY-SA 3.0
2016-03-22T11:16:04.863Z
I do. The database ist created beforehand as an entirely empty instance. The funny thing is, if I run the script from the commandline via curl it works perfectly fine, but if I let it run via the yeoman generator I created, via curl as well, it throws those errors. But the database is created perfectly fine anyway.
Ferdinand Grüner
CC BY-SA 3.0
2016-03-19T00:24:34.650Z
2016-03-19T00:24:34.650Z
Brad Bell
<p>I´m trying to automate the installation process of Craft as far as possible.
So my question is the following: </p>

<p>Is there a way to automate the Craft installer (the one with the monkey), possibly through a config file or through the command line or whatever. Of course there are possible solutions using headless browsers, but I think that would be too much of an effort for that task.</p>

<p>I´m really looking forward to your replies!</p>

<p>Thanks in advance and cheers!</p>

<p>Ferdi</p>

<installation>
Is it possible to skip Craft Installer through command line or something similar?
# Is it possible to skip Craft Installer through command line or something similar?

(Asked by: username_0 on 2016-03-18)

I´m trying to automate the installation process of Craft as far as possible.
So my question is the following:

Is there a way to automate the Craft installer (the one with the monkey), possibly through a config file or through the command line or whatever. Of course there are possible solutions using headless browsers, but I think that would be too much of an effort for that task.

I´m really looking forward to your replies!

Thanks in advance and cheers!

Ferdi

**Tags:** installation


---

## 1 answers

### Answer by username_1 on 2016-03-19. Score: 2

There are several ways you could approach this. There is a [bash script](https://github.com/mattstauffer/makeItCraft) that automates downloading the latest version of Craft, but it doesn't do the actual installation.

What I would do is create a PHP script that used prompted to accept Craft's license agreement, then used cURL/wget to download and extract the files. You could prompt for all the information you need for installation (username, password, database, database connection info, etc.), then the script would load Craft's `craft/app/bootstrap.php` and call Craft's [`InstallService->run()`](https://craftcms.com/classreference/services/InstallService#run-detail) method passing in the necessary values similar to how Craft's `craft/app/controller/InstallController` does.

> **Comments:**
> **username_0**: Thanks a lot! I already solved the downloading unpacking and so on but so far the installation was sort of a mystery to me :D I give your idea a shot and will reply when I´m finished :)  
> **username_0**: It worked perfectly fine! Sometime I still get some errors because of the craft_assets table being already created, but I´m sure I´m able to fix that.  
> **username_1**: You'll just want to make sure you're starting from a completely empty database (no tables at all) before running it.  
> **username_0**: I do. The database ist created beforehand as an entirely empty instance. The funny thing is, if I run the script from the commandline via curl it works perfectly fine, but if I let it run via the yeoman generator I created, via curl as well, it throws those errors. But the database is created perfectly fine anyway.  

---

