Category: Hosting Headaches

Cleaning up interworx email

To test do this:

find ./ -mindepth 1 -depth -type f -mtime +365 -printf ‘%AF %b %p\n’



Then if it’s all okay, do this:

find ./ -mindepth 1 -type f -mtime +365 -delete

cPanel to Interworx

On the cPanel server:

/scripts/pkgacct acctname

On the iWorx server:

scp cpanel.ip.address:/home/cpmove-*.tar.gz /home/

/usr/local/interworx/bin/import.pex --control-panel cpanel --ipv4 target.ip.address --archive /home/cpmove-acctname.tar.gz | tee -a /home/acctname.import.log

Those pesky CPanel backups

How to create backup of Individual cPanel Account via SSH?

Step 1: Log-in to the SSH as Root user.

Step 2: Enter the following command string on the command line interface:

/scripts/pkgacct username

[Note: The account backup will be created in the current directory you are in.]

How to Restore the Individual cPanel Account via SSH?

Step 1: To restore the cPanel account backups, enter the following command

/scripts/restorepkg username

[Note: In order to restore the data, you need to be in the directory where the backup file is stored.]

This is the easiest way to backup and restore individual cPanel web hosting accounts via command line interface.

Permissions

To change all the directories to 755 (drwxr-xr-x):

find . -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r–r–):

find . -type f -exec chmod 644 {} \;

Goddamn hackers

find . -name '*.php' -print > badfile.txt
vi badfile.txt
:s%/.\//rm -f .\/

grep -H -r -l '\$sF\=' /path/to/dir/to/check/ > badfile.txt

Local ini on Storm/CentOS

Needs:

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/USERNAME/public_html
</IfModule>
<Files php.ini>
order allow,deny 
deny from all 
</Files>

 

in .htaccess

and ini must have chown for USERNAME

Hosting Recommendations

I keep a document of hosting recommendations to share with clients. This is one of those things that changes often, as companies come and go, get bought and sold, etc, so I’m simply going to link to the Google Doc that I share with clients.

Contact Form 7 and Bluehost

Had some issues setting up a site developed by other developers. Aaaaaand this is why Gravity Forms is better. But, anyway, the solution was simple enough: http://wordpress.org/support/topic/contact-form-7-not-working-6

Update: Come to find the same issue with Gravity Forms on a Liquid Web VPS. I realized that (duh) this would always be an issue for clients who use a remote mail exchanger, as the server won’t even look outside itself if it thinks the mail exchanger is local. So, the steps for a cPanel host (which is most of my clients):

cPanel->Mail->MX Entry->Choose Domain-> Find MX Record and look for “Email Routing”->Change to Remote Exchanger.

Of course, ONLY do this for sites that aren’t using the web host to collect mail!