Archive | Tutorials RSS for this section

How to move a large database from one Linux server to another

RSync

Suppose you have a virtual server with a massive database that you need to move from one Linux server to another. Let’s also assume that you don’t have copious amounts of bandwidth at your disposal to download and upload the SQL files. I have found that the simplest method to move large files between two [...]

Continue Reading

Cache certain areas of your page using PHP

Sometimes it’s necessary to cache only certain elements or areas of your dynamic website to speed up the load times. I recently needed to cache two DIV’s that were being dynamically generated on one of my websites.

Continue Reading

Redirect all pages of a domain except for one page with .htaccess

I had a really tough time this morning trying to figure out how to redirect all pages of one domain to another domain, but stop one (or two) of the pages on the old domain from redirecting. The solution is as follows:   RewriteEngine on #Note: do not include a "/" in the beginning of [...]

Continue Reading

WordPress 3 error: Warning: Cannot modify header information

This error message has the ability to drive some developers completely insane. However, the solution to this error is A LOT easier than you think.

Continue Reading

Extracting a domain name with PHP and Regular Expressions

As most of your know, regular expressions can be a nightmare if you don’t know much about the subject. Here is a quick tutorial on how you can extract the domain name from any URL using regular expressions and PHP. This includes http:// and https:// domain names.   <?php $link1 = "http://nickduncan.co.za/"; $link2 = "http://nickduncan.co.za"; [...]

Continue Reading