As subtle as a flying brick.

Archive for March, 2009

Giving WordPress Its Own Directory

 

Many people want WordPress to power their site’s root (e.g.http://example.com) but they don’t want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your blog exist in the site root.

WARNING: Multisite Users – Please Read

This process is not applicable to and does not work if you have enabled MultiSite.

Moving a Root install to its own directory

The process to move WordPress into its own directory is as follows:

  1. Create the new location for the core WordPress files to be stored (we will use /wordpress in our examples). (On linux, use mkdir wordpress from your www directory. You’ll probably want to use “chown apache:apache” on the wordpress directory you created.)
  2. Go to the General panel.
  3. In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example:http://example.com/wordpress
  4. In the box for Site address (URL): change the address to the root directory’s URL. Example: http://example.com
  5. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  6. Move your WordPress core files to the new location (WordPress address).
  7. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
  8. Open your root directory’s index.php file in a text editor
  9. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');
  10. Login to the new location. It might now be http://example.com/wordpress/wp-admin/
  11. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)

Using a pre-existing subdirectory install

If you already have WordPress installed in its own folder (i.e. http://example.com/wordpress) then the steps are as follows:

  1. Go to the General panel.
  2. In the box for Site address (URL): change the address to the root directory’s URL. Example: http://example.com
  3. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  4. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
  5. Open your root directory’s index.php file in a text editor
  6. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');
  7. Login to your site. It should still be http://example.com/wordpress/wp-admin/
  8. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)

Pointing your home site’s URL to a subdirectory

In some cases, you may have a WordPress site that changes significantly every year, such as with a conference website. If you want to install each year’s version of the site in a subdirectory, such as /2010, /2011, and /2012, but have the root domain (yoursite.com) automatically redirect to a particular subdirectory (usually the latest), follow this technique:

  1. Install WordPress in a subdirectory, such as /2012.
  2. In your root folder (not the subdirectory folder), download and open your .htaccess file.
  3. Add the following to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
RewriteRule ^(/)?$ blog [L]
  1. In the above code, change the “YourDomain.com” value to your root domain.
  2. In the above code, change the “blog” value to the subdirectory.
  3. Save and upload the .htacess file back to your root directory.

Now when users to go your root domain (yoursite.com), it will automatically redirect to the subdirectory you specified. When you want to redirect to a new subdirectory, such as the conference site for next year, just update the .htaccess redirect code.

 


It’s the most important meal of the day!

Oh, but breakfast truly is the most important meal of the day. For a bit of background, Chris Kimball of Cook’s Illustrated can teach you the history of pioneer and Victorian breakfasts, which were centered around foods we still enjoy today. Donuts are a staple, as are breakfast cereals, themselves the subject of a fine and storied history. Bacon is a universe unto itself, as you surely already know.

And what about the waffle? Not just a taste senstation but namesake to one of America’s great culinary joys. And it’s versatile, too. Fried joy is yours with the equally versatile beignet, fried apples and, of course, the simple and elegant fried egg.

All this wonderful food, surely we must have equally wonderful drink! Coffee is a staple, as is breakfast tea. But you deny yourself some of life’s great pleasures if you stop short of alcoholic breakfast drinks: mimosas, Bloody Marys, Irish coffee, or this eponymous joy built upon vodka, peach schnapps and raspberry liqueur.


“No crime is so great as daring to excel.” — Winston Churchill

A little detective work traced the problem to default date format
conversions and floating-point format conversions in the very useful
Excel program package. The date conversions affect at least 30 gene
names; the floating-point conversions affect at least 2,000 if Riken
identifiers are included. These conversions are irreversible; the original gene names cannot be recovered.


Yet another reason not to use Excel as your “database”.


Music That Makes You Stupider.

Lil Wayne makes you stupider. Its been proven.


Amycakes

This is a reposting of my old Office Managers email and ICQ messages to my coworkers.

Amy Vs. The Booger Bandit
  

I’ve been informed that someone has been wiping snot on the walls of the
stalls in the men’s washroom. At first when I was told this, it was hard to
believe since who the hell would be doing this especially at our ages, but
once I actually saw for myself it definately is snot.

This message is intended for whoever is doing this and I am hoping that it’s
only one sick person and not a couple of people. PLEASE STOP DOING THIS!
If you need to wipe your nose, use the toilet paper that is in the stall
beside you, not your finger.

Now I hope I made the person feel really bad about what they’re doing and
hopefully it will stop today.

Thanks,

Amy Johnson

Smokey the bear rides again
  

This is intended for the people that smoke in here. Someone decided to dump
an ashtray full of cigarette butts into the garbage in the men’s washroom
right after they finished smoking which caught the toilet paper in the
garbage on fire.

The person should have known this would happen but apparently they’ve never
learned what would happen in a case like this.

So to all the smokers, please don’t dump ashtrays into garbages after you
just finished smoking. Water puts cigarettes out, not toilet paper.

Thanks,

Amy Johnson

Amy Vs. The Brown Bomber
  

This is another message for those people in here who don’t have any common
sense. Someone decided to put that rough brown paper towel in the toilet,
almost clogging it. If someone is using that to wipe with, they’ve got some
serious problems, that shits rough! We have toilet paper for wiping and
which doesn’t clog the toilet. We just had an episode with a clogged toilet
two weeks ago and don’t want another one so please use your head and think
before you do something so stupid.

I’m hoping I don’t have to keep doing this but it seems to be getting worse
around here. Maybe we should take a class on common sense even though I
doubt that’ll help since we all should know what not to do by now.

Thanks,

Amy Johnson

Amy The Holiday Girl
   For all of you that keep telling me that Monday is a stat holiday, I
called the province of New Brunswick like I’ve done all the other years
I’ve worked here to ask them about this holiday. It’s considered a stat
holiday but not a paid Stat holiday so it’s up to the employer whether
to have us work or not. New Brunswick only has 6 paid public holidays
while other provinces have more or some have less. Do, DON”T icq me
about this again.
Here’s a link you can look at for NB:

http://www.info-galaxy.com/Holiday/Holidays_in_Canada/holidays_in_canada.html

Thanks,

Amy Johnson

Amy Poops on Another Party
   Before you start asking where the chips are, we will not be getting
anymore chips, pop/bottled water from now on. The reason being is it
has become too expensive and some people have been taking advantage of
it by eating/drinking too much too fast.

DON’T respond to this icq please.

Amy Johnson

Amy Tackles the Floaters
   I’ve been informed that some people arn’t flushing the toilets
in the men’s washroom, please flush after each time you use it. It’s
discusting for other people to have to do it for you.
Once again, more common sense that has to be mentioned.

Amy Johnson

Amy Wields her Plunger in Anger
   I am hoping this is going to be the last message I have to send
to you guys. When taking a shit, FLUSH THE DAMN TOILET or don’t use an
entire roll of toilet paper to wipe your ass. No wonder the toilet gets
clogged so often. If you notice it’s clogged, don’t leave until it’s
fixed because I’m sick of going in there, trying to hold back the puke
and fixing it myself.
This is not a damn elementary school.

Amy Johnson

Amy and the logistics of pooping, pt. I
   There is no running water at the moment, we’re trying to figure
out what happened. Please do not flush the toilet when you use it until
I let you know it’s fixed so NO SHITTING!! We don’t need another
plugged toilet

Amy Johnson

Amy and the logistics of pooping, pt. II
   Paul just told me the water is working fine so you may poop freely!!

Amy Johnson

Amy combats Chairjacking
   There has been a person(s) taking chairs from other people. Everyone has a
chair so there’s no reason to be taking chairs from other people. If you
have a problem with your chair, come talk to me and I can get you a new one
but please don’t be taking someone else’s chair from now on.

Amy Johnson

I. P. Freely
   People have been telling me that when they’ve gone to the
bathroom there’s been piss all over the seat and/or floor. Now this
isn’t the mall bathroom where you don’t care whether or not someone
after you sits in your piss, these are your co-workers so you should
have the decency to wipe up after yourself. If you are not coordinated
enough to make it in the toilet without dribbling all over it maybe you
should practice at home on your own toilet.

Amy Johnson

A picture really is worth 1,000 words
  

Amy gets pissed off
   I’ve been getting complaints yet again about people pissing on
the toilet seat. It is mostly in the bathroom by the CS room so whoever
uses that bathroom please aim more carefully or wipe up the mess
afterwards so others don’t have to. If you can’t even pee properly I
don’t even want to imagine you trying to do anything else with it.

Amy Johnson

Amy don’t take no shit
   Here’s another message about the CS bathroom and some disgusting employee.

Apparently pissing on the seat wasn’t enough so now someone has decided
they have to shit on the seat and leave it for the next person to
clean. This is getting ridiculous, there’s people in here who obviously
were never taught how to use the toilet properly. If you want to come
talk to me personally, I can see if I can find you some bathroom
Etiquette courses to take because you shouldn’t be allowed to go out in
public until you get that resolved.

Amy Johnson

Smoking doesn’t kill people… Amy kills people.
   Even thought you’ve been told many many times there is still people
smoking in the bathrooms. Would you please just grow up and respect the
rules of your workplace and your co-workers. Andrew has been nice
enough to buy a bus for you to smoke in, yet you are too lazy to go
outside and use it so you’ll do what you’ve probably done since junior
high and that is hide out in the bathroom and smoke your cigarette.
You’re pathetic.
Just go outside like everyone else and stop thinking you’re somehow special because you’re not.

Amy Johnson

Amy dishes out the Christmas cheer…
   There has been a change of plans for the christmas party. Because we
have some ungrateful whiners in here who can’t appreciate anything that
is a little different than our usual christmas party activity we will
now be having dinner at Pizza Delight and that’s it. Curling has been
cancelled because apparently some of you think it’s such a stupid idea
and felt the need to have to complain. I don’t know how you thought by
complaining about it would do any good but now the ones that have have
ruined it for everyone else.

SO HERE’S A BIG THANK YOU! Hope you’re pleased with yourselves.

Amy Johnson