10 Web Hosting Hacks

lucy-hogg .

The team here at Nimbus Hosting have compiled a top ten list of hacks for troubleshooting web-hosting issues.

1. Using Private Mode in your browser

Opening a new browser window in private mode (or incognito in Chrome) uses a fresh cache so visiting a web page will download a fresh copy of a web site. This is particular useful if you’re testing a web site you visit regularly.

Chrome

incognito window in chrome

Safari

incognito window Safari

2. MySQL Dumper

If you need to export a MySQL database when you only have FTP access it can be tricky. You can get around this by uploading the open source tool MySQL Dumper. This is a PHP application that will allow you to export individual tables or an entire database. It’s also particularly useful when you have a large database that can cause phpMyAdmin to timeout on an export.

How to use MySQL Dumper:

1) Download MySQL Dumper from http://www.mysqldumper.net/

2) Unzip the download files

3) Upload files via FTP to the server

4) Visit the folder in your browser ie http://www.domain.com/mysqldumper/

3. Out of Disk Space

If you’re on Linux server with SSH access and you’re short of disk space this command will provide a list of files over 500M in size. These large files tend to be log files or old backups that are usually no longer required.

find / -size +500000k

4. Finding all WordPress sites and version

Do you need to find all the versions of WordPress you have on a single server? This command will do exactly that.

grep ‘wp_version =’ $(locate wp-includes/version.php)

5. Tracing where redirects are going?

Most people don’t realise that browsers actually cache redirects so it can be very difficult troubleshoot where they actually end up. However the following commands will give you the uncached address along with the journey of the redirect, ie where there might be multiple redirects. These commands, for example, will work on SSH Linux or the Mac Terminal:

wget http://www.nimbushosting.co.uk

curl –I http://www.nimbushosting.co.uk/

6. Remembering those pesky commands in SSH

Sometimes it’s impossible to remember what commands you’ve used. Use the following commands to either see your history of SSH commands or search for commands you’ve used in the past.

History

command r (return) search

7. What’s going on with my web traffic?

If you’re using Apache it can be sometimes be tricky to find out what traffic is hitting a web site especially if you have a web site under attack or receiving plenty of traffic. Enabling the server-status page in Apache will give you a snapshot of what’s going on and what files are being requested. Refreshing the page will update this snapshot.

8. Blocking a specific IP

Looking through logs or the Apache Server Status can sometimes reveal a single IP address hitting the server too many times. Use the following command to block them from accessing the server completely.

/sbin/iptables -I INPUT -s 1.2.3.4 -j DROP

9. Separating your email from your web site

We recommend moving your email to a hosted provider like Google Apps, Office365 or Zoho. Not only do you receive the added benefits of shared calendars, contacts and folders but also if your web site is ever hacked or goes offline your email won’t be affected.

10. Email not being delivered to the same address as the web site.

Do you ever have an issue where email forms from your web site are not being delivered? This is a really common issue where Plesk or cPanel has email delivery configured as a local domain. Disable this and problem solved.

Plesk

contact forms not being delivered to email   contact form not delivering to email

cPanel

contact form not delivering to email

×