WordPress 500 Internal Server Error

I received a 500 Internal Server Error on a wordpress site I was working on and thought I’d write a quick note about what I learned.

This is what caused the error:

Redirect http://oldSiteAddress.com/oldpage.php http://newSiteAddress.com/newpage

It should have been written as follows:

Redirect /oldpage.php http://newSiteAddress.com/newpage

If you want more information about redirect how-to I found these sites to be helpful:

Just as an fyi – this particular site has been completely revamped resulting in new url configurations.

Since we still wanted users to be able to find the information from the older pages so we implemented 301 redirects for specific pages as well as the overall site. It works beautifully.

Upgrading WordPress – Oooii

Just a quick how-to note about upgrading to WordPress 3.0.2.

I was trying to upgrade a client’s WordPress install through the Admin area.  I kept getting a weird memory error:  Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2356995 bytes) in …wp-includes/http.php on line 1331.  Then I tried to upgrade through the hosting company’s “Install Central” but that didn’t work either.  Contacted hosting company and they also couldn’t figure out the problem.

In the process of getting ready to manually upgrade it occurred to me that I should “Deactivate” all the active plugins for the site (after I made a back up of my database and my theme files – very important!).  Worked like a charm!

Then as I tried to activate my plugins I got another fatal error: Fatal error: Call to a member function add_rewrite_tag() on a non-object in  wp-includes/taxonomy.php. So I did an search and found a neat little “trick” on the forum at BytesForAll which suggested renaming the plugins directory to something else, i.e. pluginsx, creating a new plugins directory and then adding and activating plugins one at a time.  Worked like a charm!

Until…I tried to activate the last plugin which for me was WP e-Commerce.  Bamm!  Same fatal error.  And now the whole site was down – couldn’t delete or deactivate any of the plugins via the Admin area.  Even removing the plugins directory via ftp (or through hosts’ File Manager) didn’t work.

So I said a prayer and reinstalled the upgrade making sure I had an empty plugins directory.  Yes, you guessed it – worked like a charm!

Until…I tried WP e-Commerce again – same issue but this time I was able to delete it and the site didn’t break.

I was a bit stymied and tried a couple of things but ended up creating a clean install of WP e-Commerce.  I had to then copy the themes that came with the new install into the uploads > wpsc > themes directory.  I also transferred my custom theme images and theme from my local backup to the wpsc > themes directory and except for a few tweaks here and there, every is – well – working like a charm!  Really!

Lessons:

  1. Backup, back up, back up!
    1. Back up your database.
    2. Back up your theme.
    3. Backup any customized plugin files.
    4. Backup images.
    5. Back up your CSS files
  2. Note what plugins you have active
  3. Before upgrade revert to a default WordPress theme
  4. Deactivate your plugins – if necessary delete them and reinstall upgraded versions.  Make a note of any special codes you had to enter.
  5. Keep your themes separate.
  6. If you customize any plugin files rename them so they don’t get overwritten during an upgrade
  7. For WP e-Commerce, keep backups of all your images and custom themes.  If you have the Gold cart, install it after you install the main WP e-Commerce (just as you normally would with fresh install)

Tools I use when I need to learn

Here are some places I go when I need to learn something new:

  • Right now lynda.com software tutorials are my mainstay. A monthly subscription is required but there is no continual obligation. When times are quite or I want to learn something new I turn to lynda.
  • W 3 Schools: when i was first learning basic html I turned to them often.  I love that they let you test what they are teaching – really helped me understand more about what I was doing.  And I still go there when I need a basic understanding of a particular technology.
  • Site Point:  I have several of their books and visit thier forums fairly often.  Lots of good solid information.
  • HTML Dog:  When I was working for a large Fortune 500 company I became interested in web accessibility.  At the time, our company was using a navigation system that required mouse clicks (you can’t see the mouse trail if you are visually impaired) and I wanted desperately to show my collegues that there was a better more accessible way to build navigation that still had the cool drop-down action.  I, and many others, are in debt to the developers at HTML Dog for  their “Sons of Suckerfish” tutorial
  • Accessify:  I’ve only recently discovered this site, but find some the tools very helpful.
  • Listomatic:  If you want some examples and code for quick navigation to here.
  • Dynamic Drive CSS Library:  Great starting place for tableless builds