Category: Server Administration / cPanel / WHM

How to exclude a sub directory from .htaccess 301 redirects

So, here’s something that comes up all the time – you have a sub-directory you want to exclude from a global .htaccess redirect. Often this is due to installing another application within the document-relative paths of an existing website or web application.


  • You want to install a copy of WordPress within an existing Drupal website.
  • or maybe you have an application framework like Cake PHP and you need to exclude a directory from the error handling that occurs across all 404s.

CS-Cart upgrade settings for your server.

One of the problems that you may have while upgrading CS-Cart is that the upgrade inexplicably fails during the upgrade process. If you are lucky, you will get a error trace umped to a file or the screen. If not, it may just silently fail in the background or freeze up.

This is certainly no fun. There’s a number of different carts that experience this, so it is not limited to just CS-Cart by any means.

Before you attempt any upgrade of your system, it is best to create a development (beta) area for you to test out the upgrade in first.…

How to export all databases in MYSQL via SSH command line dump

The following is a script you can use to dump all of your databases that the user, in this case “backup” has access to. You can save this as a script file and then run it using a CRON job in your control panel.

Note – this command is not doing cleanup of the archives it creates so you will want to rotate the backups or other use it for specific purposes – such as offsite backups where another script performs cleanup.…

How to find large files via SSH on a server.

There are times when you need to figure out what is filling up disk space on a server or other device (block storage, CDN, external storage, etc) and quickly!

Things like:

  • runaway logging
  • backups & backup of backups
  • large archives
  • dev or beta areas for testing and development work
  • clients or customers who suddenly upload a lot of files

The command you want to run in order to output where large files exist is:

find / -type f -size +1048576k -exec ls -lh {} \; 2> /dev/null | awk ‘{ print $NF “: ” $5 }’  | sort -nrk 2,2

The above would look for files greater than 1 gigabyte in size and then output the path to those files so you could further examine them.…

How to rsync files from one server or directory to another

Moving files can be a tedious job for some projects and there are many different ways to move files.

  • You can take the easy way – FTP or sFTP (secure FTP) the files down to your local computer, then upload them to the new location.
  • You can create an archive of the files you want to move on the source server, then SSH into your target server and do a wget command.

    e.g. wget[filename]. Then you would un-pack those files into the destination directory or put them in a working directory and move them from there.

How to CHMOD all files to 644 and all Directories to 755 via SSH

Often we find ourselves needing to bulk change all file permissions or all directory permission for an entire site or directory.

To do this with your individual ftp client is time consuming and some of the ftp software clients try to recursively change everything to the same file permission, including directories. Yes, I am talking to you WinSCP.

To separate these out you just need to log into your server or hosting account via SSH, navigate to the directory you want to start the change in and type:

find .

How to upgrade your dedicated server to a cluster of servers

One of the things that a website or server may have to do in its lifetime is scale up to a cluster of servers.

What’s a cluster?

A cluster can mean several things, but at a bare minimum it means “more than one server”. Yes, I realize that is not all that helpful to understanding all of this just yet, but stay with me.

Typical cluster configurations:

One web server – One database server:

With this set up we do not need to employ a load balancer that sends traffic requests to one or the other serve.…

How to use Windows FTP through My Network Places

Here is how you can use Window’s built-in FTP client through My Network Places (or Netowrks in Vista)

How to FTP Files using Windows – Steps:

In XP – go to “My network places”

In VISTA – “Go to “Networks”

Select “Add new network”

Select “Other network place” (usually the last option, some computer “load” this section with ISP offers, etc – by default it is just ‘MSN’)

Type in the following:


Password: [whatever your ftp pass is]

Username: [whatever you username is]

Now you can drag and drop files into your ftp space “almost” like your desktop.…

Dedicated, VPS and Shared Hosting Speeds (Bandwidth, MBPS, etc)

We get this a lot when talking to customers, namely they bring up an example of a web hosting outfit who is offering a cheaper rate or more bandwidth for a lower price.

Example. We have a client who pushes about 620 gigs of data a month on one of our dedicated servers. They stream a large amount of videos (no, it is not what you think).

Now the way we work, being a specialty web host and all – is we do not employ limiting software for our clients as far as how much of the “pipe” they can use.…

Mod_Security Rules, Lists, Tweaks and other Madness

Securing your servers & applications is always at the forefront of any “good” development group’s conscience.

If it is not, then heck, you are amateurs and your company deserves to whither and die because this is not a business where the”Fisher Price – My First Web Company” type of stuff cuts it.

This applies to the following people or companies:

  1. Web Freelancers who deploy open source or use community-grown contributions and freeware code for their clients.
  2. Companies & Developers who deploy or base customer-applications or tools off of open source or other frameworks.