Pages

Saturday, April 5, 2014

Drupal Upgrade

Here we will explain in simple steps how to upgrade your Drupal application to the latest stable version.
STEP 1The first step is to visit the official Drupal site and download the latest stable release of Drupal.
Once the download is complete, you need to upload the new version of Drupal on your website. The safest way to do that is to create a new folder in the public_html directory of your website, e.g. drupal_new, and upload the new version package there. Then you need to extract the archive file through cPanel -> File Manager.
If you don't have cPanel, you can extract the archive on your computer and upload its contents to your account using your favorite FTP client.
STEP 2Once you have the new version uploaded in the drupal_new folder, you should copy the necessary files and folders from the old version of Drupal to the new one.
Here we assume that you already have a full backup of your live Drupal site. Navigate to the backup folder of your Drupal site and copy the .htaccess file, the sites and the files directories and upload them into the drupal_new folder by overwriting any existing files.
Now, go to your cPanel -> File manager -> public_html -> drupal_new/sites/default folder and open the settings.php file for editing.
Edit the following line:
$update_free_access = FALSE;
and change it to:
$update_free_access = TRUE;
The changes above will allow you to run the update.php script from your browser.
STEP 3The next step is to update the database of your Drupal.
Go to
http://yourdomainname.com/drupal_new/update.php
where yourdomainname.com is replaced with your actual domain name. The screen should look similar to the one below.
Click on the Continue button and follow the instructions.
A list with the pending updates will be published. You can check them. Click on the Apply pending updates button to perform the update.
If there are no errors reported, your Drupal application is successfully upgraded.
Due to security reasons you should turn the $update_free_access variable back to false in the settings.php file:
$update_free_access = FALSE;
Open a new window in your browser and point it to the site you have just upgraded. As we performed the upgrade in a test folder drupal_new you should point your browser to: http://yourdomainname.com/drupal_new/
Once you are sure that the upgraded version of the site works properly you can delete or rename the old folder to drupal_old and rename drupal_new to drupal in order to put the new version live.

MySQL Backup/Restore Tutorial

Learn how to backup and restore MySQL databases in your hosting account. Here you will find detailed instructions on how to archive your information and restore it when needed.

MySQL Export: How to backup your MySQL database?

You can easily create a dump file(export/backup) of a database used by your account. In order to do so you should access the phpMyAdmin tool available in your cPanel:
The phpMyAdmin tool will be loaded shortly.
You can select the database that you would like to backup from the Database menu (located in the upper left corner of the page).
A new page will be loaded in phpMyAdmin showing the selected database. In order to proceed with the backup click on the Export tab:
The options that you should select apart from the default ones are Save as file (which will save the file locally to your computer in an .sql format) and Add DROP TABLE (which will add the drop table functionality if the table already exists in the database backup) as shown below:
Click on the Go button to start the export/backup procedure for your database:
A download window will pop up prompting for the exact place where you would like to save the file on your local computer. It is possible that the download starts automatically. This depends on your browser's settings.

MySQL Import: How to restore your MySQL database from a backup

To restore (import) a database via phpMyAdmin, first choose the database you'll be importing data into. This can be done from the corresponding menu on the left. Then click the Import tab:
You have the option of importing an .sql file. Choose the file from your local computer. Note that you are given the option to pick the character set of the file from the drop down-menu just below the upload box. If you are not certain about the character set your database is using just leave the default one.
In order to start the restore click on the Go button at the bottom-right. A notification will be displayed upon a successful database import. 

Search Engine Friendly URLs

Here we will try to explain how you can enable the clean URLs in Drupal in three simple steps. Most servers fully support the Apache mod_rewrite module and all Drupal users hosted on our servers will be able to use the clean URLs option.
There are only 3 steps you need to follow to enable the Search Engine Friendly URLs.Here we assume that you already have Drupal installation for your account into the /drupal subfolder (www.yourdomainname.com/drupal) and you want to activate the clean URLs.
STEP 1Edit the .htaccess file in your Drupal directory.
Delete the entire content of the .htaccess file and insert the following lines into it:
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
You should replace the path in the following line:
RewriteBase /drupal
with the relative path to the directory where Drupal is installed. For example if your Drupal is installed in your web site root folder and you access it via www.yourdomainname.com, the line should look like this:
RewriteBase /
STEP 2The next step is to log in the administrative back end of your Drupal site and make sure that the "Path" module is enabled. This module is essential for the clean URLs in Drupal.
Once you are logged click on the "Modules" link:
Scroll down the page, find the Path module, tick the little check box on the left of the module and save the settings:
STEP 3The next and final step is to test the clean URLs and confirm their functionality. In the administrative back end click on the Configuration link from the top menu and open the Clean URLs section.
The page will be loaded. Make sure that the clean URLs checkbox is enabled and the configuration is saved.
Now load the front end of your site and point the mouse over a link. In the status bar and in the address bar you will notice that all links will be in clean (human readable) format.

How to Create a Backup of Drupal?

In order to backup your Drupal application you have to:
STEP 1Backup all your web site files.
Backup all the files and folders inside your Drupal directory. You can do that by downloading them via your favourite FTP client. 
STEP 2Backup/Export your database
Then, you have to export your Drupal database. You can do that by using PHPMyAdmin. Please, check our tutorial on how to backup/restore MySQL database in order to create a backup of your Drupal database.
Please, make sure that you choose the correct database, which your Drupal application uses.
If you are unsure about the Drupal database name, you will be able to find it in the drupal_folder/sites/default/settings.php file. You can view this file through cPanel -> File manager.