Home arrow Site Administration arrow Upload and Deploy Drupal from Ubuntu XAMPP to Hosting Server using SSH

Upload and Deploy Drupal from Ubuntu XAMPP to Hosting Server using SSH

This is an important tutorial on how to upload and deploy your Drupal website from Ubuntu XAMPP to a remote hosting server. In this way, you can deploy your website to the Internet and make it viewable by everyone.

  1. Upload and Deploy Drupal from Ubuntu XAMPP to Hosting Server using SSH
  2. Import Drupal Database from XAMPP to a Hosting Server
By: Codex-M
Rating: starstarstarstarstar / 4
December 20, 2010

print this article



This beginner tutorial will focus more on Linux users; the installation instructions assume you are using Linux OS, PHP and MySQL in Apache web server. SSH (Secure Shell) also must be enabled in your hosting account. For details, you need to contact your hosting support.

Updating Modules and Running Cron Manually

This step assumes you have completed your Drupal website development in Ubuntu XAMPP. But before you upload it to your hosting server, you need to make sure that you are using the latest modules, and that you have run the cron manually.

Installing modules is best done through a development server, so that it won't interrupt your visitors in a production environment.

To do this:

  1. Log in to your Drupal website as administrator.
  2. Click "Administer" - "Reports" - "Status Reports."
  3. If all items under "Status Report" have green check marks, then you can skip this section and move on to next section.
  4. If not all items have green check marks, or some items are NOT up to date, click "run cron manually" first.
  5. After seeing the message "Cron ran successfully," click "Available updates."
  6. Make sure all of those items are "Up to date" before uploading the website to your server.

To upgrade an outdated module, go through the following steps.

  1. For modules that are not updated under "Available updates," click the "Download" link. This will download the package to your Ubuntu download directory.
  2. Go to your Drupal module directory (/opt/lampp/htdocs/drupal/modules) in XAMPP and delete the old module folder.
  3. Right click on the module tar.gz package and click "Extract here." Copy the extracted folder to the Drupal module directory in XAMPP. This is now the new/updated module.
  4. Make sure you are still logged in as administrator to your Drupal website. In the browser address bar, run update.php e.g. entering the URL below and pressing enter: http://localhost/drupal/update.php
  5. Follow the procedure stated in update.php. This will perform any necessary updating to your Drupal database because of updated modules. You need to ensure that you have no errors during this update before uploading your website.

You can browse your website after update.php and see if everything operates normally, as it did before. If you are using an outdated Drupal core, you should update it also, before uploading to the server. You can follow the tutorial here: http://drupal.org/upgrade/tutorial-introduction

The objective of this section is to make sure all of your modules and the Drupal core are up to date before uploading to the server.

Creating a domain or sub-domain in your hosting account

Since you need to upload your Drupal website to your hosting account, you need to assign a domain or sub-domain name to it. To do this, log in to your hosting account and add a domain name. For details on adding a domain name to your hosting account, you need to refer to your hosting support manual/tutorials.

It can take some time for the DNS propagation to complete. To test that your domain or sub-domain is ready for uploading, you need to do the following:

1. At the Linux terminal, log in to your SSH server:

codex-m@codex-m-desktop:~$ ssh yourusername@your_ssh_hostname.com

2. Enter your SSH password.

3. Most websites are placed in the www folder (or some using public_html), but that depends on how the hosting company configures your hosting account, so you need to look for it.

After logging in, try viewing all files and directories using the ls command:

-bash-2.08b$ ls
logs/ mail/ sys/ temporary/ tmp/ www/

4. Go into the www folder (using the CD command) and view the files again until you see your domain added in your hosting account:

-bash-2.08b$ cd www
-bash-2.08b$ ls
codexdrupal.php-developer.org/  dotnetdevelopment.net/
codexjoomla.php-developer.org/  php-developer.org/

Suppose that, in this example, a sub-domain is used for the Drupal installation in the remote server (you can also use the domain name, not a sub-domain). And the sub-domain is codexdrupal.php-developer.org. Go to this sub-domain:

-bash-2.08b$ cd codexdrupal.php-developer.org

You are now in the root directory of your future Drupal website. Delete all unnecessary files created by your hosting company:

-bash-2.08b$ rm *

5. In the bash prompt, type:

-bash-2.08b$ pico fullserverpath.php

In the editor type this script:


To save, press Control- O then press Enter key. To exit, press Control-X. View the full server path of your root directory in the browser by entering:


It will return, for example, something like this:


This means the full server path to the root directory is:


You can safely delete fullserverpath.php after this. If your SSH server does not have the PICO command, you can manually create the PHP script in your Ubuntu desktop with the code shown above. Then you can upload it to your Drupal website root directory using an SSH client and view the return path in the browser.

>>> More Site Administration Articles          >>> More By Codex-M

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: