Automatic cPanel backup (domain & MySQL) with cron & PHP

This backup script includes SSL support. This isn't necessary if you run the script on the server for which you're generating the backup; but the SSL support is very important if you're running the script somewhere else to connect to your cPanel hosting account.


// PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server.
// This script contains passwords.  KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir, not /www/)


// Info required for cPanel access
$cpuser = "username"; // Username used to login to CPanel
$cppass = "password"; // Password used to login to CPanel
$domain = ""; // Domain name where CPanel is run
$skin = "x"; // Set to cPanel skin you use (script won't work if it doesn't match). Most people run the default x theme

// Info required for FTP host
$ftpuser = "ftpusername"; // Username for FTP account
$ftppass = "ftppassword"; // Password for FTP account
$ftphost = ""; // Full hostname or IP address for FTP host
$ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)

// Notification information
$notifyemail = "This email address is being protected from spambots. You need JavaScript enabled to view it."; // Email address to send results

// Secure or non-secure mode
$secure = 0; // Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP

// Set to 1 to have web page result appear in your cron log
$debug = 0;


if ($secure) {
   $url = "ssl://".$domain;
   $port = 2083;
} else {
   $url = $domain;
   $port = 2082;

$socket = fsockopen($url,$port);
if (!$socket) { echo "Failed to open socket connection... Bailing out!\n"; exit; }

// Encode authentication string
$authstr = $cpuser.":".$cppass;
$pass = base64_encode($authstr);

$params = "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$ftppass&submit=Generate Backup";

// Make POST to cPanel
fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0\r\n");
fputs($socket,"Host: $domain\r\n");
fputs($socket,"Authorization: Basic $pass\r\n");
fputs($socket,"Connection: Close\r\n");

// Grab response even if we don't do anything with it.
while (!feof($socket)) {
  $response = fgets($socket,4096);
  if ($debug) echo $response;



To schedule the script to run regularly, save it as fullbackup.php in your top directory (not /public_html, which would be less secure), and enter a new cron job like the following:

15 2 * * * /usr/local/bin/php /home/youraccount/fullbackup.php 

(Runs every night at 2:15 a.m.)


15 2 * * 1 /usr/local/bin/php /home/youraccount/fullbackup.php 

(Runs every Sunday night at 2:15 a.m.)

How To Add New User in Joomla Using PHPMyAdmin

If you need to create  new Joomla user, but for some reason can’t do it through Joomla administration, best option  is using phpMyAdmin.

1. Log into phpMyAdmin (username & password is in configuration.php file,  search for public $user and public $password ).

2.On top, click SQL. Change following code accordingly to your needs:
phpMyAdmin add Joomla user

  • change database to actual database name If you don’t know database name site’s using, it’s in configuration.php file, search for public $db.
  • change prefix_to database’s prefix
  • in this example, login name is user and password is  password ( password will be stored in database as 5f4dcc3b5aa765d61d8327deb882cf99. For another password, go to step 3)
INSERT INTO `database`.`prefix_users`
(`id`, `name`, `username`, `email`, `password`, `usertype`, `block`,
`sendEmail`, `registerDate`, `lastvisitDate`, `activation`, `params`)
VALUES ('62', 'Super User', 'user', ' This email address is being protected from spambots. You need JavaScript enabled to view it.',
'Super Administrator', '0', '1', '2012-08-06 00:00:00', '2012-08-06 00:00:00',
'', '{}');

For Joomla 1.7 and 2.5 also run this code:

INSERT INTO `database`.`prefix_users` (
`user_id` ,
'62', '8'

3. About passwords: as Joomla stores passwords in MD5 format, you need to convert password in MD5. Visit MD5 Converter , write password, hit button and copy generated MD5 string.
For example, MD5 version of password is 5f4dcc3b5aa765d61d8327deb882cf99

4. Congratulations, you’ve successfully added user via phpMyAdmin. You can now log into Joomla administration!

Joomla 2.5 – User Lost Super Administrator Access

Joomla 2.5 Tutorials – Not too sure how it happened, but one of my super admin user lost Super Administrator access.  I might have accidentally changed it in the backend now I do not have access to the backend with Super Administrator access.

How to fix?  Below I will show you how to do it.  You will need access to your database via the phpMyAdmin through your web hosting provider.  Only make these changes below if you know what you are doing.  Making a mistake will bring down your website.

Overview of How to Grant Super Admin User Super Administrator Access

  • Get the Super Admin User ID in the _users table
  • Get the Super Users Group ID in the _usergroups table
  • Find & Edit the User in the _user_usergroups_map table
  • Change Group ID in the _user_usergroups_map table


1.  Get the Super Admin User ID in the _users table

After logging into your database and access your Joomla 2.5 website database.  Along the left navigation you will find all the tables in your database.  Each user you create in Joomla 2.5 is associated with a User ID.  Each User ID is unique.   You will need to associate this User ID with a Group ID  later in Step 4.

cmsmind joomla 2 5 change to super administrator Joomla 2.5   User Lost Super Administrator Access

Joomla 2.5 – _users table see Super User User ID

  • Search for the table name _users
  • Click on table name _users, click on ‘Browse
  • View your table contents and see in my case my Super User ID = 42
  • That is the User ID I want to have Super Administrator access.

2.  Get the Super Users Group ID in the _usergroups table

Now there is a group ID for the Super Administrators (Super Users).  You will need to find this Group ID number to associate it with the User ID in step 1.

cmsmind joomla 2 5 change to super administrator 2 Joomla 2.5   User Lost Super Administrator Access Joomla 2.5 – Super Administrator Group ID _usergroups table

  • Search for the table name  _usergroups
  • Click on the table name _usergroups and click on the ‘Browse‘ tab
  • View the contents and see that the ‘Super Users’ Group ID = 8

3.  Find & Edit the User in the _user_usergroups_ map table

Now we want to match the User ID with the Group ID in the _user_usergroups_map table.  This table is how Joomla 2.5 manages user groups.  It maps the User ID in step 1 with the Group ID in Step 2.

cmsmind joomla 2 5 change to super administrator 3 Joomla 2.5   User Lost Super Administrator Access

Joomla 2.5 – User groups Map table

  • Search for the table name _user_usergroups_map
  • Click on the table name _user_usergroups_map and click on the ‘Browse‘ tab
  • You can see in the above screenshot that my User ID 42 is incorrectly mapped to Group ID 2.  If you look at Step 2, Group ID 2 is an Registered group.
  • So I need to edit User ID 42 to be Group ID = 8
  • for User_ID = 42, Click  on the ‘Pencil‘ icon (second column) to edit the row

4.  Change Group ID in the _user_usergroups_map table

As mentioned above, we are going to edit the Super User to have Super Administrator rights by editing the User ID in the table _user_usergroups_map.

cmsmind joomla 2 5 change to super administrator 4 Joomla 2.5   User Lost Super Administrator Access

Joomla 2.5 – Change User ID to have Super Administrator Access

  • Change field to the following value:
    • group_id = 8
  • Click on ‘Go’

Now if you view your  _user_usergroups_map table, you will see that your Super User account is correctly mapped to Group ID = 8.  You can log into your Joomla 2.5 administrator backend and access your site as a Super Administrator User.

cmsmind joomla 2 5 change to super administrator 5 Joomla 2.5   User Lost Super Administrator Access

Joomla 2.5 – Super Administrator has Super User Access

How to move whole joomla site to different domain name

All you really need to do is keep the old domain name pointed to the same Joomla install and add a rule in htaccess to update the domain name to the new one. This not only fixes any fully qualified domain names in links within your content or modules, it also fixes any backlinks that might exist from old domains. Here is what you need to add to htaccess -

RewriteCond %{HTTP_HOST} ^ [NC] 
RewriteRule ^(.*)$$1 [L,R=301] 

If you are moving the site to a new host, use Akeeba backup to move the site.

In both cases you will want to make sure the old domain is forwarding to the new one and you have the above htaccess rule set up to fix any links that might otherwise be broken.

How to create custom error pages in cPanel

This demo assumes you've already logged in to cPanel

Now let's learn how to create custom error pages

1) Click the Error Pages icon

There are several different error pages you can customize. In this tutorial, we're going to customize the 404 error page

2) Click the 404 link

This is where you create your custom error page. You can include one or more tags to further customize the page. You cam also use HTML tags in your page, thus making it easy to match the look of your error page to the rest of your website

3) Now let's create our custom 404 error page

4) When finished, click Save

That's it! The custom 404 error page has been created

You can customize the other error pages as well... but you don't have to if you don't want... all accounts come preset with standard error pages

This is the end of the tutorial. You now know how to create custom error pages in cPanel


Online Payment:

We have Added a new Payment Method, you can now pay for SMS on

Click to Buy SMS


DND Issue Resolved:

The default sender ID are now rUPDATE to MTN.  Whatever sender ID you use to send SMS will automatically be  replaced by the new default sender ID. Please, endeavour to add your sender name in the message to indicate it is from you.

With Our corporate route, your messages will enjoy real-time magic delivery to all Nigerian numbers regardless of the DND status. We shall keep you posted on the progress we are making. Thank you for your perfect understanding.

Please note: SMS Charges to MTN is now 2 units/SMS.