Install Drupal 6 website backup from hosting server in Slackware 14.1

Install a backup for your website is a good practice. Here is a tutorial on how to backup your Drupal website and install it in Slackware 14.1 64bit example.


  1. Download latest website database from your hosting server
  2. Download files directory from your hosting server
  3. Download sites directory from your hosting server
  4. Download Drupal core from drupal website
  5. Configure MariaDB in Slackware 14.1
  6. Configure web server in Slackware 14.1

Configure MariaDB in Slackware 14.1

If you haven't setup MariaDB in Slackware yet, that's the first thing you have to do. See our tutorial on how to configure MariaDB in Slackware 14.1. It's an easy few steps because Slackware has MariaDB pre-configured.

Configure Web Server in Slackware 14.1

Slackware has Web Server pre-configured as well. All configuration files are in /etc/httpd directory. Here is a simple Web Server setup and configuration for our Drupal website.

First, we edit /etc/httpd/httpd.conf file.

[email protected]:~# vim /etc/httpd/httpd.conf

1. Add:

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.

DirectoryIndex index.html index.php index.htm index.xhtml


2. Enable PHP:

# Uncomment the following line to enable PHP:
Include /etc/httpd/mod_php.conf

3. Enable mod_rewrite:

LoadModule rewrite_module lib64/httpd/modules/

4. Edit 'AllowOverride None' to 'AllowOverride All' in the main directive for DocumentRoot:

DocumentRoot "/srv/httpd/htdocs"

# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# for more information.
Options Indexes FollowSymLinks

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#AllowOverride None
AllowOverride All

# Controls who can get stuff from this server.
Require all granted

5. Save and exit file (Ctrl+ZZ).

Configure PHP

1. Edit /etc/httpd/php.ini file:

[email protected]:~# vim /etc/httpd/php.ini

2. Set timezone to your location:

; Defines the default timezone used by the date functions
;date.timezone =
date.timezone = "US/Arizona"

3. Change maximum allowed size for uploaded files:

; Maximum allowed size for uploaded files.
;upload_max_filesize = 2M
upload_max_filesize = 8M

4. Save and exit file (Ctrl+ZZ).

5. Start web server:

[email protected]:~# chmod 755 /etc/rc.d/rc.httpd
[email protected]:~# /etc/rc.d/rc.httpd start

Install and configure Drupal backup website in Slackware

1. Copy Drupal website backup directory from your hosting server to your Slackware /var/www/htdocs/. You can also use a clean drupal core downloaded from Drupal website:

[email protected]:/home/jinlusuh/Documents/basicconfig# cp -R drupal-6.29/ /var/www/htdocs/

2. Rename the Drupal directory as necessary:

[email protected]:/home/jinlusuh/Documents/basicconfig# mv /var/www/htdocs/drupal-6.29/ /var/www/htdocs/basicconfig

3. If you choose to use a clean drupal core, copy 'files' folder from your hosting website to the backup website in your Slackware (if you setup your Drupal website to use 'files' directory in the root instead of 'sites/default/files'):

[email protected]:/home/jinlusuh/Documents/basicconfig# cp -R files/ /var/www/htdocs/basicconfig/

4. Give full permission to the 'files' directory:

[email protected]:/home/jinlusuh/Documents/basicconfig# chmod 777 /var/www/htdocs/basicconfig/files

Note: Don't forget 'tmp' directory should be created as well.

5. Now copy your 'sites' directory from your hosting website to the backup website directory in your Slackware:

[email protected]:/home/jinlusuh/Documents/basicconfig# cp -R sites/ /var/www/htdocs/basicconfig/

6. Edit sites/default/setting.php.

[email protected]:/var/www/htdocs/basicconfig/sites/default# vim settings.php


* Database URL format:
* $db_url = 'mysql://username:[email protected]/databasename';
* $db_url = 'mysqli://username:[email protected]/databasename';
* $db_url = 'pgsql://username:[email protected]/databasename';
$db_url = 'mysql://root:[email protected]/basicconfdb';
$db_prefix = '';


# $cookie_domain = '';
$cookie_domain = 'localhost/website-dir-name';

Set 'cookie domain' to your local website directory (Drupal website directory in your Slackware). If you don't set this or forgot to change the name, you won't be able to login to your Drupal website with Access Denied "You are not authorized to access this page" error.

7. Import drupal website database from your hosting server to the new MariaDB database in Slackware:

[email protected]:/var/www/htdocs/basicconfig/sites/default# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1
Server version: 5.5.32-MariaDB MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use basicconfdb;
Database changed
MariaDB [basicconfdb]> source /home/jinlusuh/basicconfdb.sql;

Note: Change the correct path to where your database located. Normally, the backup database downloaded from hosting server would be archived and compressed in 'your-database.sql.bz2' or ''. Uncompress it first.

8. Now open web browser and type 'localhost/your-website-directory-name'.

Final check

1. Check File System directory existence (url:localhost/your-website/admin/settings/file-system)

2. Check Status Report (url:localhost/your-website/admin/reports/status)

Problem and trouble-shooting

Check your website status (url:your-website/admin/reports/status). Normally, the 'files' directory would be the problem because of permission.

Image module directories Missing directory
The image module's image directory files/content is missing.

Change permission for 'files/content' directory and other directories as well:

[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 content/
[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 content/temp/
[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 color/
[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 download/
[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 imagepicker/
[email protected]:/var/www/htdocs/basicconfig/files# chmod 777 images/

That's it for now. If you have problem installing Drupal backup from your hosting server to your Slackware by following this tutorial, please comment.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.