Jan
30

Converting a site to WP but doing the right SEO stuff

Mainly what you have to do is:

  1. Convert the site to WP
  2. Once all is good with WP edit .htaccess
  3. Above all the wordpress stuff you have to add this type of thing: Redirect 301 /myoldurl.html http://mydomain.com/newpagename
  4. You have to add that for each old file that you want to redirect to the new file
  5. There is info all over the net, including here: http://stackoverflow.com/questions/3696002/converting-a-static-site-to-a-wordpress-site-how-to-transfer-convert-seo-ranki
Jan
6

Install WordPress in sub-directory, run in home directory

It’s been a while since I posted.  I’ve been a busy bee!  This post will be short and sweet.

I work on a lot of existing sites that I’m converting to WordPress. I want to leave the current site in place and work on WP in sub-directory until its time to go live.  This link will tell you how to do it:

http://www.optiniche.com/blog/145/wordpress-tutorial-install-wordpress-in-a-different-directory/

That’s it…see short and sweet!

Oct
31

Virus, Spyware, etc. My thoughts and recommendations

Author Chris Cummings    Category Spyware, Virus     Tags

I get these questions quite frequently (which I don’t really mind) but I thought it’d be handy if I just posted my thoughts.  Nothing highly structured here just things as I think of them:

First you must have some software to protect against viruses AND spyware.  If you dont you will be infected within 10-15 seconds of being online.  That is not a joke.  You will.

Everyone has their own favorites and least favorites.  I started out, like most, with Norton and McAfee.  Last time I used Norton was about 5 years ago and it was protecting as it should but sucking the resources out of my machine.  When I got my new quad core nearly 2 years ago it came with a year of McAfee.  Previous versions had been resource hogs as well but that version did well for me while I had it.  If you get a computer with McAfee or Norton on it and it comes with some free protection, use it, it should be good for you.  BUT JUST USE ONE OF THE OTHER.  If you put more than one on your machine, they fight like those little beta fish they talk about in this book that I loved when I was younger.

When my McAfee expired I went looking for a free solution and there are many out there.  Again a lot of people like a lot of different things.  I have been a fan of AVG from GriSoft for a few years now.  It seems to work very well for me.  You can get the free version here: http://free.avg.com/us-en/homepage

Some people prefer Avira.  I have it on one laptop and it works well too.  Get it here: http://www.avira.com/en/free-download-avira-free-antivirus/x-origin/web

Another program that I like that you CAN run in tandem is AdAware.  See the problem you will always face is you could have 10 different antivirus and antispyware softwares running on your machine and each one would catch and miss things the others didn’t.  It’s a bit of crap shoot.  (Can I say that? Crap shoot?)  Anyway Get AdAware here: http://www.lavasoft.com/

One of the best performing pieces of software I have found in the last few years is Malwarebytes.  It is great!  See you dont just have to worry about viruses any more…this isn’t 1999.  Now you have to worry about Viruses, spyware, trojans, malware, root kits, worms…the whole shebang!  Save yourself some headache and get Malware Bytes: http://www.malwarebytes.org/products/malwarebytes_free

HOW YOU CAN HELP YOURSELF

There are some easy things you can do to protect yourself, I’m gonna fire them off here in bullet points.  Trust me, do these things.

  • Back up your hard drive.  Invest in an external hard drive and back up.  Viruses etc will happen.  Even if they dont your drive will eventually die.  You will not thank me now.  You WILL thank me later.
  • Don’t click that link.  On facebook, in the email etc…you don’t know whats there and some fairly big sites that get infected.  Just don’t do it.  This will save you some headache.
  • If you are on a web page and a link is promising you free coffee for a year at starbucks and you click it…You will get infected if you click it. You will.  Trust me.  You WONT get free coffee but you WILL get virtual gonorrhea. You have been warned.
  • I do not care who  sent you that email and how funny they thought it was.  Don’t open that attachment and dont click that link.  I have an older relative that sends about 2 emails a week that are forwards…I pretty much delete them.  If they knew they’d be crushed.  But then again, I have to clean their computer regularly and mine is clean.  I don’t care if your saintly mom sent you the email.  If you did not request the attached file, don’t click it.  Just. Don’t.

FINALLY

Sometimes you are going to get infected.  It happens to the best of us.  It hasn’t happened to me in a while but it happened to my wife…from her college site.  Yep.  And it was bad.  Really bad.  It is going to happen.  When it does try the software above but if it doesn’t work TAKE IT TO SOMEONE WHO KNOWS HOW TO FIX IT.  Trust me, it is worth the $25 or $50 or more to get it really cleaned off.

AND SOMETIMES…..sometimes the infection is just t0o bad and you need to wipe your hard drive.  But that is OK…because you have those backups and know where your original discs are, right?  Right?  Right?  RIGHT?!?!

Oct
27

PHP, Cookies and www…oh my!

Author Chris Cummings    Category Cookies, PHP     Tags

It always amazes me how many little “gotchas” there are in web design.  Here’s the sitch:

  1. Set a cookie using PHP at www.site.com/wordpress…set the cookie for the root: /
  2. Can read the cookie at www.site.com/wordpress
  3. Can NOT read the cookie at www.site.com/another_folder
  4. CAN read the cookie at site.com/another_folder (without the www)

After some digging found this article which shares how to set cookies so they can be accessed at www. or .

http://stackoverflow.com/questions/2345137/php-cookie-problem-www-or-without-www

Boo-ya!

Sep
13

Constants: Programming 101

Author Chris Cummings    Category PHP     Tags

I’m not the smartest knife in the cookie jar and sometimes I forget my most basic of basics.  I was doing some PHP programming and here’s what I needed.  I needed a “variable” that was global but I didn’t want to have to reference it inside every function as global before I used it.  I racked my brain on what to do here.  This “variable” was not to change as what it was, was the root path of a site (http://www.site.com) and I knew my site would be moving at least once…every time I moved I didn’t want to update 40 references to “http://www.site.com/”.  What to do, what to do?

Finally I had an A-Ha moment…I started singing “Take On Me“.  Then after that I realized my answer was simple and something I probably hadn’t used in a bajillion years.  CONSTANTS!

For those that may have forgotten them a constant is sorta like a variable, but they never, ever, ever change once you set them.  that’s why they are CONSTANTS (as in constantly the same…ok, that’s a bit murky, scratch that…)

So here is how you define a constant in PHP:

define("HOWDY", "Hello world. ");

Simple, eh?
Here is how you use it (well, one example):

echo HOWDY . "How you doin?";

See? Easy-peezy.
Now go, use constants!

PS.  This is a PHP example, but you know constants are in pretty much every language.  Right?  Right!

Sep
8

Free Photoshop Actions

Author Chris Cummings    Category Photoshop     Tags

Want some free Photoshop actions?  Who doesn’t!?!  Here are some awesome ones from a friend: http://www.wegotactions.com/

Aug
31

Droid Phone wont boot? This may help.

Thought I’d throw this quick note out there.  I’m using a Droid 2, which I’ve been very happy with (because its awesome, runs a lot of apps and because the company I started working for in January provides it for FREE!)

I grabbed my phone from the charger this morning and a couple of hours later looked at it and it was dead and wouldn’t boot (yes, boot…it IS a computer).

Slapped it on my USB charger at work but no dice, even though the charge light on the side said it was working.

Had a co-worker try his battery in mine, worked fine, so it wasn’t the phone.

After some thought I’m pretty sure that my home charger was unplugged from the wall and so my phone not only didn’t charge but probably ran completely down.  A quick web search revealed that if your Droid 2 (and I’m guessing other Droids) is down below 5% or so, a USB charger wont work.  Luckily I had my car charger out in the car, went out, plugged in and immediately, ZU-ZAP! got my Motorola logo.

So if you phone is wicked dead, don’t try a USB charge, go wall or car.

Aug
23

Put wordpress on a site with an existing page.

Author Chris Cummings    Category PHP, Wordpress     Tags

So I had this site that already had a page up.  I needed to install wordpress in the root and make some changes but I didn’t want wordpress to be live to the general public…after asking in 4 forums and not getting help I figure this out.  I was thinking I should use .htaccess but I solved this with a stand alone page and a cookie checker added to the themes header.php

Here’s the good:

  1. Moved my current page from www.site.com to www.site.com/sub/
  2. Created a page accessible only to me on the site that sets and destroys a cookie in the root directory using something like this:
    $action = $_GET['action'];
    if ($action == "create")	{	setcookie("dealvilletempcookie123", "yes", time()+(60*60*24*365),"/");			}
    if ($action == "destroy")	{	setcookie("dealvilletempcookie123", "no", time()+(60*60*24*365),"/");				}
  3.  

  4. In the header.php file of the WP theme I check the cookie.
    If its set to YES then I do nothing (which opens the WP install in the root directory)
    If its set to NO (or not set or set to anything else) then I use the PHP header function to redirect…do this at the very top of the header file, before you load an WP stuff.  ITS THE LAW! :-)

Whoop…there it is.

Aug
8

The First Web Page: Kickin’ it old school…

Remember your first web page?  Mine was on Geocities.  Aaahhhhh, Geocities!  Good times.

Here is THE first web page…sorta.  It’s actually a revision of the first page (which no longer exists) but its an early revision.  The first page dropped in 1991 and this is a revision from 1992.

Enjoy: http://www.w3.org/History/19921103-hypertext/hypertext/WWW/TheProject.html