Wordpress: Using multisite domain mapping on a mediatemple grid server

 

This won’t get into setting up multisite in wordpress, but it will help you set up multisite domain mapping on a grid server from media temple. If you need to see a good intro article on setting up multisite mode in wordpress, check this article out or this article for a good multisite .htaccess intro.

First, install WordPress MU Domain Mapping plugin, and follow the instructions for setting that up.

Now, to add a new domain to media temple that will show up on your site, the big catch is to redirect this domain to the existing main domain.

For example, originalsite.com is the main root domain, and I am going to create newsite.com.

  1. Add the domains you’d like to use (newsite.com in this example) as alternate domains in the AccountCenter.
  2. Log into your (gs) via SSH, move into the domains directory and delete the folders for newsite.com with these commands:

    cd domains rm -rf newsite.com
    
  3. Create a symlink named ‘newsite.com’ that points at the originalsite.com folder with this command:

    ln -s originalsite.com newsite.com
    

This will now have newsite.com pointing to originalsite.com, which thanks to the domain mapping plugin above, you will see the new site show up when you run it. I tried to make this sound as straight forward as I could, so I apologize if it ended up being more complex.

 
 

However beautiful the strategy…

 

However beautiful the strategy, you should occasionally look at the results.

Winston Churchill

 
 

Sanitizing PHP request variables quickly

 

foreach($_POST as $k=>$v){
    $_POST[$k] = filter_input(INPUT_GET, $k, FILTER_SANITIZE_SPECIAL_CHARS);
}
foreach($_GET as $k=>$v){
    $_GET[$k] = filter_input(INPUT_GET, $k, FILTER_SANITIZE_SPECIAL_CHARS);
}
 
 

Kaitlyns first time skating

 

kaitlyns-first-time-skating.txt

 
 

A 2 year olds attempt at pottery art

 

a-2-year-olds-attempt-at-pottery-art.txt

Kaitlyn’s latest attempt to make something with Crayola air dry clay. So far, we’ve made a bowl, a pen holder and the latest, a snowman. If you haven’t tried this yet, it’s fun for all involved.

 
 

Recursively remove all .svn files from a folder

 

I use SVN for code control all the time, and sometimes you have to remember to delete the various .svn files that get created when you upload to a website. This little line, executed at the command-line will do just that:

rm -rf `find . -type d -name .svn`