Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


The DirectAdmin module uses the API version 1 which is deprecated. To avoid using a deprecated version, use the DirectAdmin2 module which uses the API version 2. Below you will find the instruction that will help you to migrate all servers from the DirectAdmin module to DirectAdmin2.

Migration


  1. Make sure that the DirectAdmin2 module is enabled.
  2. Connect to the database.
  3. You should run the query which is below.

Query

Migration from cPanel to cPanel2
SET @directadmin2 = (SELECT `id` FROM hb_modules_configuration WHERE `filename` = 'class.directadmin2.php'),
@directadmin = (SELECT `id` FROM hb_modules_configuration WHERE `filename` = 'class.directadmin.php');
UPDATE hb_server_groups g, hb_servers s, hb_products_modules p
SET g.`module` = IF(@directadmin2 IS NOT NULL, @directadmin2, @directadmin),
s.`default_module` = IF(@directadmin2 IS NOT NULL, @directadmin2, @directadmin),
p.`module` = IF(@directadmin2 IS NOT NULL, @directadmin2, @directadmin)
WHERE g.`module` = @directadmin AND s.`default_module` = @directadmin AND p.`module` = @directadmin;

If you do not have any program to connect to the database, you can execute this query using the command line.

  1. Log in to the server where you have the HostBill installation.
  2. Then use the commands:
mysql;
use {$database_name};

Where {$database_name} is the name of the database you want to connect to. You can find the name of your database in the file public_html/includes/config.php

Then execute the SQL query that is above.

  • No labels