Namecheap shared hosting starting guide

I recently moved from JustHost to Namecheap, because I paid 191 USD for 2 years on JustHost and only 66 USD for 2 years on Namecheap (had a 20% discount).

I have less space on Namecheap and there is no "anytime money back guarantee" but I'll take the risk, and all my domains are registered there anyway.

Moving files to your Namecheap new server

To painlessly move websites from servers to servers, follow the instructions! If you're looking to move files on your computer to the server, you can also follow this guide.

Make sure your previous server and your new servers have the same configuration. Be careful with PHP versions, MySQL versions, etc. It may be wise to backup your previous php.ini file, if any.

Make sure you have SSH access on both servers.

Connect to your new Namecheap server:

ssh [email protected]_server -p 21098

You'll be prompted for your password. Once you're in, use rsync to synchronize your files from your old server to your new server. rsync may not be installed, ask the admin to install it.

rsync -avz [email protected]_domain:previous_path new_path

You'll be asked for your old password. Hit enter and let the transfer begin!

You can check rsync information here: http://linux.die.net/man/1/rsync

Re-create your databases and users if necessary. Dump your MySQL databases and re-import them into your new server: you can do this with PHPMyAdmin or via SSH. In your database, make a search to look for old paths and replace with new paths.

For example, my path on JustHost was /home3/username/public_html/ and my new path is /home/username/public_html

These paths may be written in the WordPress options table, and in wp-config.php, therefore, they may need to be changed if you installed WordPress in a subfolder.

I changed my database and username so I had to edit wp-config.php with the new information.

When this is done, change your domain DNS.

Configure PHP

A lot of functions are disabled by default by Namecheap but fortunately, we can enable them by tweaking php.ini

You can find a default php.ini file in your cPanel, or upload the previous one you had in your root directory.

Once this is done, to use your php.ini file, add this line in your .htaccess file:

suPHP_ConfigPath /home/username/public_html

(if your php.ini file is in the public_html directory)

I'm using EWWW Image Optimizer plugin and I needed exec(), this was disabled in the default php.ini file. Look for disable_functions, and remove exec and any other functions you need.

disable_functions = ""

(empty quotes)

PHP mail()

Namecheap disable the sending of emails with mail() if the "From" address is not an email created on their server. What you can do is to create an email like "[email protected]" from your Namecheap account, and use it for the "From" field. You can specify the real address in the Reply-to header.

<?php
$to = "[email protected]";
$subject = "Subject";
$message = "Lorem ipsum dolor amet";
$headers = "From: [email protected]" . "\r\n" ."Reply-To: [email protected]";
mail($to, $subject, $message, $headers);
?>

Google Apps

If you used Google Apps, you may need to reconfigure them again.

Namecheap has a great Google Apps tool in cPanel, just enter your Google verification code, then start activating the different apps. They'll have the right CName/MX records automatically.

Optimizing your website

Apache module mod_deflate is not activated by default on Namecheap. You will have to activate it in your cPanel, under Softwares/Services > Optimize Website.

That's about it for now. I hope my experience on Namecheap will be good!