PHP Script For Updating Drupal Core
Updating Drupal core can be a difficult process because Drupal still doesn't support core update in online way. We must download the core first, extract it, then upload it to our server manually. This process can take more time because of so many manual operations. In order to solve that problem, I try to create a PHP script to make the update process easier. We just need to open a URL with some query string and then the script will download the requested Drupal core to our server. What we need to do next is run the update.php.
How To Use
This script is very easy to use. We assume that the newest Drupal core version is 7.23, so we just need to open the following URL with our web browser.
http://<website>/update_drupal.php?afn=drupal-7.23
After that, the Drupal core will be updated and we just need to run update.php
To enhance the security, you can protect the page from anonymous user by forcing user to login before running drupal_update.php.
This script can be downloaded from the attachment section.
UPDATE
It seems the Drupal download URL is using HTTPS now. So this script needs little update. Find the following line:
<?php
...
$drupal_url = 'http://ftp.drupal.org/files/projects';
...
?>
Then replace it with:
<?php
...
$drupal_url = 'https://ftp.drupal.org/files/projects';
...
?>
Attachment | Size |
---|---|
drupal_update.zip | 1.09 KB |
Comments
tjfbrtybtru (not verified)
Mon, 08/11/2014 - 20:35
Permalink
Super coll awesome
Yes indeed. Updating drupal core is indeed a hard job. That’s the main disadvantage of drupal. Otherwise it is okay and the notable point is that drupal is an open source project and it gives opportunity for web site developers like me to meet each powered web dev other.
Add new comment