How do I backup and migrate my Xoops website?

Requested and Answered by Carnuke on 2004/12/8 21:57:36

How do I backup and migrate my Xoops website?

Backup procedures:
(For hosted xoops sites)

When backing up a xoops site, you will need to get a backup of both the file structure (the xoops site and modules) as well as the MySQL database

FileStructure Backup
To backup the file structure, you need to download the complete xoops html folder with an FTP application.

Note:Some modules safe certain cache files in a hidden or locked mode, so the FTP application either does not see the file or can not download it. Make sure you test your backup and restore procedure at least once so you do not get surprises when you restore a real backup.

MYSQL Backup
You will need to have access to your MySQL database via the phpMyAdmin. Under the main "Welcome to phpMyAdmin" window, you will find the "export" function.
View dump (schema) of databases:
- Select the database you want to backup
- Select SQL
- Select your compression (zipped/gzipped/bzipped)
- Press "Go"
and your database will be downloaded via your web browser to your local computer

For more detailed backup/restore instructions of an MySQL database, I found a tutorial at: Wordpress Tutorial site

Restore to a different site:
You can upload your file structure to the new site with an FTP application. Note the path of the new server will be different than the previous site. You will have to know the physical path as well as the virtual path (URL)

// XOOPS Physical Path
    // Physical path to your main XOOPS directory WITHOUT trailing slash

// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash

Now you will have to edit your "mainfile.php" and change the path according to the new site URL and physical path.

Restore your SQL database
In the new site you will need to have access to your mySQL via the "PHPMyAdmin" application again.

Upload the database by opening the "Run SQL query" window. Select the "database backup" zip file and run the query. The database will be created on the new site.
Now you have to create the same MySQL database user as in the old site and give the correct access rights to the user.

That should be all.

The xoops site should run on the new site now.
(Please feel free to amend if not complete)

If you get an error like this:

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34

then you need to check your user name and password in your mainfile.php

This Q&A was found on XOOPS Web Application System :