While working on code for Drupal 7, I've been creating and dropping databases all over the place. And each time I drop a database, I have to go to my browser and fill out all the site information again.
So this got me thinking... does it really need to be this way? (Spoiler: it doesn't)
A few weeks ago I found Byte Craft kamal's awesome post about twill, a really simple language that lets you fill out HTML forms from the command line, and how it can be used to install your Drupal site without using your browser at all!
In this post, I will expand that solution to show you how you can create scripts to download and install Drupal and then show you a script you can use to automate the recreation of your site when you drop the database.
Comments
Hi, there's a python version
Hi, there's a python version of the script I created short while ago. You can find it at my bitbucket repo:-
http://bitbucket.org/k4ml/pulut2/src/tip/scripts/
Good explanation, updated my post to refer here.
The Demo Module
You could also just use the demo module, which would give you other improvements. You just install drupal and enable the demo module. Then you tell the demo module to save your current place. Next, go have whatever fun you want on your drupal site.
When you decide you want to return the the initial setup, just go to the demo module and restore your spot in a couple clicks.
It also has the advantage of allowing you to save various versions along the way if you are developing a module and want to have a config that you are testing the upgrade of, just create a config that includes the old config, then enable the module with the upgrade stuff in it, found out it failed, revert to the old config using the demo module and ... well, I think you get the point.
http://drupal.org/project/demo
It's also possible to install
It's also possible to install twill with the Phyton easy_install (http://peak.telecommunity.com/DevCenter/EasyInstall) Script.
$ easy_install twill
That's great to know, thanks!
That's great to know, thanks!
Install Drupal 6 using the Command Line with Drush and Twill
It's a little pain to install drupal from curl due to all the different redirects the install script makes. You also need to read and write cookies at exact moments. However: I have made a curl script which will install drupal from the command line :) Note: Only tested with drupal-6.x, php5 and the php curl extension.
http://www.os-cms.net/install-drupal-with-curl
===================================
Surviving in the IT industry is tough and only by the use of testking a+ online courses and preparation materials can pass real exams be the true accomplishers in the IT world. The avoidance of braindump is a must to pass the certification exams.
The above adresse of the drupal php curl script is not correct
This is the correct address:
http://www.os-cms.net/content/article/view/1