Difference between revisions of "Maintenance"

From WHMCS Documentation

Line 29: Line 29:
 
It is strongly recommended that you backup your WHMCS Database regularly to ensure you always have a copy of your data should a server or system failure occur.  Backing up the database is a very simply task with the built in backup tool.  This is how to use it:  
 
It is strongly recommended that you backup your WHMCS Database regularly to ensure you always have a copy of your data should a server or system failure occur.  Backing up the database is a very simply task with the built in backup tool.  This is how to use it:  
  
1. Login to your WHMCS Admin Area  
+
#Login to your WHMCS Admin Area  
 
+
#Go to Utilities > Database Status  
2. Go to Utilities > Database Status  
+
#Click the Download Full Database Backup button at the top of the page  
 
+
#You should be prompted for a file to download. Save the file to your computer.  Depending on the database size, this may take a few moments.  
3. Click the Download Full Database Backup button at the top of the page  
+
#Once the download is complete you have now backed up your database.
 
 
4. You should be prompted for a file to download. Save the file to your computer.  Depending on the database size, this may take a few moments.  
 
 
 
5. Once the download is complete you have now backed up your database.
 
  
 
==Restoring a Database Backup==
 
==Restoring a Database Backup==
 
If you need to restore a backup of your database then you will need to use the following steps.  If you have not already recreated your database, do so now.  If your database is created, you must drop the existing WHMCS tables.  
 
If you need to restore a backup of your database then you will need to use the following steps.  If you have not already recreated your database, do so now.  If your database is created, you must drop the existing WHMCS tables.  
  
1. Log in to phpMyAdmin and select the database you want to restore the backup to  
+
#Log in to phpMyAdmin and select the database you want to restore the backup to  
 
+
#Click the SQL tab at the top  
2. Click the SQL tab at the top  
+
#Click the Browse button toward the bottom of the page
 +
#Browse to find your backup file and then press Ok
 +
#Click Go
  
3. Click the Browse button toward the bottom of the page
+
==Moving a WHMCS Install==
  
4. Browse to find your backup file and then press Ok
+
The recommended way of moving a WHMCS install is as follows:
  
5. Click Go
+
#Enable maintenance mode in General Settings to stop client side orders and changes
 +
#Export the DB from phpMyAdmin in the existing location
 +
#Restore into a new DB again using phpMyAdmin in the new location
 +
#Copy the configuration.php file over updating the DB connection details inside it for the new location
 +
#Upload the files from the latest fresh download
 +
#Reissue your license in our client area
 +
#Visit in a browser and complete upgrade process if asked to do so.

Revision as of 00:34, 3 October 2009

Resetting your database

After you successfully install your billing system you should run through a series of tests. This includes creating client accounts and placing test orders with your particular setup. Often, once you have finished your testing you will no longer want any of these clients or orders in your system. All you need to do is reset your system and all your test accounts will be removed.

You can empty all the tables that contain clients data by running the following SQL code on your database:

TRUNCATE `tblaccounts` ;
TRUNCATE `tblaffiliates` ;
TRUNCATE `tblaffiliatesaccounts` ;
TRUNCATE `tblcancelrequests` ;
TRUNCATE `tblclients` ;
TRUNCATE `tblcontacts` ;
TRUNCATE `tblcustomfields` ;
TRUNCATE `tbldomains` ;
TRUNCATE `tblemails` ;
TRUNCATE `tblhosting` ;
TRUNCATE `tblhostingaddons` ;
TRUNCATE `tblhostingconfigoptions` ;
TRUNCATE `tblinvoiceitems` ;
TRUNCATE `tblinvoices` ;
TRUNCATE `tblorders` ;
TRUNCATE `tblticketlog` ;
TRUNCATE `tblticketnotes` ;
TRUNCATE `tblticketreplies` ;
TRUNCATE `tbltickets` ; 

Note: Resetting your database only deletes client accounts and information. You will not lose any configuration settings you have setup.

Backing up your WHMCS Database

It is strongly recommended that you backup your WHMCS Database regularly to ensure you always have a copy of your data should a server or system failure occur. Backing up the database is a very simply task with the built in backup tool. This is how to use it:

  1. Login to your WHMCS Admin Area
  2. Go to Utilities > Database Status
  3. Click the Download Full Database Backup button at the top of the page
  4. You should be prompted for a file to download. Save the file to your computer. Depending on the database size, this may take a few moments.
  5. Once the download is complete you have now backed up your database.

Restoring a Database Backup

If you need to restore a backup of your database then you will need to use the following steps. If you have not already recreated your database, do so now. If your database is created, you must drop the existing WHMCS tables.

  1. Log in to phpMyAdmin and select the database you want to restore the backup to
  2. Click the SQL tab at the top
  3. Click the Browse button toward the bottom of the page
  4. Browse to find your backup file and then press Ok
  5. Click Go

Moving a WHMCS Install

The recommended way of moving a WHMCS install is as follows:

  1. Enable maintenance mode in General Settings to stop client side orders and changes
  2. Export the DB from phpMyAdmin in the existing location
  3. Restore into a new DB again using phpMyAdmin in the new location
  4. Copy the configuration.php file over updating the DB connection details inside it for the new location
  5. Upload the files from the latest fresh download
  6. Reissue your license in our client area
  7. Visit in a browser and complete upgrade process if asked to do so.