How to Edit Drupal theme without FTP access?

Posted in Articles

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

Suppose you have to make edit to the Drupal theme template.  But your client only gave you Drupal dashboard access, and no FTP access nor webhost access.  How are you going to edit the template files on the server file system?

Well, one way is to have temporarily install a web file manager on the server.  One such free third party program that I like  is extplorer at extplorer.sourceforge.net.  It is PHP which will work on the server because Drupal runs on a PHP server.

Now how are you going to install extplorer if you don’t have FTP access?   There is a Drupal module called Filebrowser for Drupal 7 that allow you to set up a directory in Drupal root and be able to upload files and create folders within that directory.  After installing this module, go to create new content and you will see the new type added for file browsing and uploading.

From this module, you can upload extplorer.  The only problem is that you can only upload one file at at time.  I didn’t see a way to upload a zip and then unzip it on the server.   But anyways, once you have extplorer up in that directory.  You can use the browser to run extplorer.  Extplorer requires a login, so not just anyone can run it.  The default username / password is admin / admin.  Make sure that after installing extplorer that you immediately run it.  Upon first login, change this password to your liking.  Otherwise, anyone who stumbles upon your extplorer can type in the default password and do whatever they want on your server file system.

Now that you have extplorer, you are able to archive, download, upload, create folder on your server web file system.  You will now be able to edit your Drupal templates by download a copy of the file, making the change, and uploading it back up to the server.

The nice thing about running a third-party file manager outside of Drupal is that if you mess up on one of the edit of one of file and bring the whole Drupal down, you can still access the extplorer and use that to rectify the situation.

With extplorer installed, you can also backup the whole Drupal file system.   You can also access the Drupal config file to see the database login and password.

With extplorer, you can install free third-party sqlbuddy.com which will allow you to backup / export the Drupal database as long as you have the database login and password.

But perhaps a better way to backup Drupal is to use the  Backup and Migrate module

Removing and cleaning up

After you done, you need to delete all the files and software that you have uploaded.  Using Filebrowser, delete the contents of each folder, then delete the folder.  (The problem is that you can not delete the folder if the folder is not empty).  After you empty the folder, it doesn’t give you a checkmark to delete the folder unless you have at less one file in the directory at the same level as the folder to be deleted.  So you should delete folders before deleting files on the same level.  Or you can upload one file, if you find that you can not delete folders.

Once you clear out all the files, you can disable the Filebrowser module and then uninstall the module.  The only problem is that it leaves behind the one folder that was created by Filebrowser at the root of Drupal.