Migrating Hosting Accounts
Plesk to DirectAdmin
Date: 15 August 2007
Migrating Hosting Accounts: Plesk to DirectAdmin:
There's no easy way to migrate hosting accounts from Plesk powered servers
to DirectAdmin servers, and many web hosters using Plesk powered servers may decide
to continue hosting on Plesk powered servers those sites that are on them
now, and only use DirectAdmin servers for new accounts.
We do offer Plesk to DirectAdmin migration services, including consulting
and server administration; please contact us for further information and
for pricing if you're interested.
Migration from Plesk powered servers to DirectAdmin is neither quick nor easy.
It's a long and tedious process.
Should you decide to do it yourself, this outline of steps should help you.
However, please note that we do NOT guarantee this procedure mimics the exact
procedure we use, nor do we guarantee that there are no mistakes in this
procedure nor that we haven't accidentally left out an important step or
steps, or that the steps here are all that will be required for a specific
site to work on your new DirectAdmin server. You should never shut down your old
Plesk powered server until after you've assured yourself that everything works on your
new DirectAdmin Server.
Note: This whitepaper does not include the transfer of email
between your Plesk powered server and your DirectAdmin server. Moving email
can be easy if you first convert your DirectAdmin server to use Dovecot
and the Maildir email file format.
- Before starting any migration assure yourself that you've installed
all the software required by all the sites, on your new DirectAdmin Server.
- Create a list of all account information for accounts on the Plesk powered
server, including all email boxes, forwards, mailing lists, etc., for each account.
Then, for each site on the Plesk powered server:
- Create the site on the DirectAdmin server using the DirectAdmin interface.
- Create all virtual email users, mailboxes, forwards, lists, etc., on the
new DirectAdmin server, using the DirectAdmin interface.
- Create the catchall setting on the new DirectAdmin server, using the DirectAdmin
interface.
- Plesk powered servers use multiple types of email users in some cases where
DirectAdmin uses one. For example, Plesk powered servers have both Redirect mail
users and Mail Aliases, but DirectAdmin uses only Forwarders.
- The Plesk Web User feature is not directly available under DirectAdmin;
if a site on the Plesk powered server has Web Users, you'll need to either create
subdirectories inside your main site, or subdomains (which will automatically create
subdirectories). Then you'll need to create ftp accounts for users to be able to
upload files to their own space.
Now let's move on to moving the sites from your Plesk powered server to your new
DirectAdmin server. Note that if you don't have enough space on your Plesk powered
server or on your new DirectAdmin server to tar up all the sites at once you may
need to do the move in multiple steps.
- First, as user admin, create a new directory on your new DirectAdmin server:
/home/admin/sites-to-move.
- Second, as user root, create a new directory on your Plesk powered server:
/home/admin/sites-to-move.
- Then tar up each site you're moving. If there's enough room on the Plesk powered
server to tar up all the sites at once you can run these commands:
# cd /home/admin/sites-to-move
# tar -czvf vhosts.tar.gz /home/httpd/vhosts
If there's not enough room on the Plesk powered server to tar up all the sites at once
you can run these commands, individually, for each site (replacing www.example.com
with the domain name of the site you're tarring up to move:
# cd /home/admin/sites-to-move
# tar -czvf example.com.tar.gz /home/httpd/vhosts/example.com
- Move the tarball (or tarballs, one at a time) from your Plesk powered server to
the DirectAdmin system. From the Plesk powered server, logged in as root, run this
command:
# scp /home/admin/sites-to-move/* [email protected]:sites-to-move
On your new DirectAdmin server the following steps will install the site contents:
-
First, as root, untar your sites:
# cd /home/admin/sites-to-move
# tar -xzvf vhosts.tar.gz
Or if you're moving one site at a time (this example is for site example.com):
# cd /home/admin/sites-to-move
# tar -xzvf example.com.tar.gz
- On your DirectAdmin server, on a site-by-site basis, install your sites.
First navigate to the httpdocs directory of the site you're installing (exactly how you do
this will differ depending on whether you moved sites individually or as one tarball).
Then navigate to the directory directly above the httpdocs directory:
# cd ..
Then run these commands (being sure to use the username and domain name for the domain you're
installing):
# mv httpdocs /home/USERNAME/domains/DOMAINNAME/
# mv cgi-bin /home/USERNAME/domains/DOMAINNAME/httpdocs
# mv httpsdocs /home/USERNAME/domains/DOMAINNAME
# cd /home/USERNAME/domains/DOMAINNAME/
# rm -Rf public_html
# rm -Rf private_html
# mv httpdocs public_html
# mv httpsdocs private_html
# chown -R USERNAME:USERNAME public_html
# chown -R USERNAME:USERNAME private_html
# chmod 755 public_html
# chmod 755 private_html
Note that you may also need to change directory and file permissions of files inside the
public_html and private_html directories, as required for the sites to work
properly. In general, DirectAdmin prefers files to be chmod 644, and directories
to be chmod 755, all owned by the site owner user. However this could differ in the
case of php or cgi files or programs.
See notes below for important issues concerning cgi-bin files and for
additional steps to take if the site is protected by a secure site
certificate.
If any of the sites on your Plesk powered server have
web users you'll
have to move the contents of their web users directories to a subdirectory or subdomain
you create in DirectAdmin; see notes above.
CGI-BIN FILES
If any site contains any CGI programs they may or may not just work
after they're moved.
If they don't work, the first thing to check would be any paths they
require either in their code or their configuration files; the paths
on the Plesk Server are significantly different from those on your new DirectAdmin
server.
It may be necessary to reinstall CGI programs on the new server using
FTP and the directions published for them.
SECURE SITES
Your Plesk powered server kept html pages and other files to be accessed only
through the https protocol in a different directory, which for our example would be:
/home/httpd/vhosts/example.com/httpsdocs
On the new server the directory will be:
/home/USERNAME/domains/example.com/private_html
When uploading files for the secure directory on the DirectAdmin server they
should be placed into that directory.
You'll also need to reinstall the Secure Site Certificate on your new DirectAdmin
server. You should be able to do that through the DirectAdmin User Control Panel,
but be sure to read the instructions.
You'll need both the Certificate file and the Key file. If you don't have them
both you may need to get a new Secure Site Certificate. Please contact us for
information on purchasing site certificates for as little as us$35.
SITE STATISTICS
Your DirectAdmin server will keep Webalizer stats for display from the DirectAdmin
User Control Panel. Old stats from your Plesk powered server will not be
integrated with the DirectAdmin Webalizer stats. You can view them from either
a secure (https) or insecure (http) page on the site if they're moved to a
directory inside either the public_html or private_html directory (don't forget
to change directory and file permissions and ownership if required). You may
want to call the directory old-stats instead of stats, as you can make
a setting in the DirectAdmin User Control Panel which will make the DirectAdmin
Webalizer stats available in public_html in a stats directory.
VIEWING SITES ON THE NEW SERVER
You should make sure your site works properly on the new server before
deleting any files.
The best way is to add a line with both the IP# and the name of the new
site with the "www" prefix (for example, example.com and www.example.com), to your
local (desktop) system's "hosts" file (see your system documentation for the location
of the hosts file), and then running a new instance of your browser.
WHEN YOU'RE SURE YOU'RE DONE
Once you're sure you're done you may want to archive the tarball.
If you do, first create a directory at /home/sites-moved and then move
the tarballs there. If you don't want to archive it you may delete it.
THE VERY LAST STEP
DirectAdmin automatically creates a DNS zone file when you create the site,
so the last step is to tell your registrar to look at DNS on your DirectAdmin
server.
When your new DNS settings propagate across the Internet, viewers will start
viewing the sites on your new DirectAdmin server.
COPYRIGHT INFORMATION
This white paper is Copyright©2007 Nobaloney Internet Services. You may copy
it for distribution in any media as long as you copy it in it's entirety including this
end section and Copyright notice. Please contact
whitepapers@nobaloney.net
to notify us of any errors or inconsistencies.
Thanks.
Jeff Lasman
NoBaloney Internet Services
15 August 2007
To return to Whitepapers index,
click Here