Wish me luck…

I’m off to redo my film site using HTML5 and CSS3. As I stated some time ago, I’ve been interested in the two technologies for some time. Little things like CSS shadows are very nice and semantic elements like article, aside and nav certainly contribute to a site better than div, div and div.

I’ve two books on HTML5; HTML5 for Web Designers/Jeremy Keith and HTML5/Bruce Lawson and Remy Sharp. Both are excellent for providing an understanding of the why along with the how.

I look forward to similar texts on CSS3.

OK! Let’s get this party started!

Posted in Tools, Web | Tagged , , | Leave a comment

Well, that’s unfortunate

As I’ve said before, I’ve tried to keep a local version of my site mirrored to my online version. This isn’t unusual for a lot of developers; it helps to stage your site, it allows you to make mistakes with little impact on the outside world and it allows you to be productive away from an Internet connection.

I’ve been fairly successful at doing this with WordPress 2.x. The new version seems to be a somewhat different story. My typical method of duplication is to:

  1. Copy the site folder from on location to another
  2. Copy the MySQL database with the following changes:
    1. Change references from www to my local MAMP server (www.wellys.com to wellys.com:8888)
    2. Change file location references as well (/Home/lkoepsel to /Users/Shared)
    3. Change the wp-config file for the proper local information

Not this time with 3.0:

  1. The Header didn’t change to my custom header
  2. The menus didn’t change to my custom menus

So far (cross fingers) those two items seem to be the only issues. Mmmm. I hate it when this happens.

UPDATE:

  1. The image for my header was in my media uploads folder but it wasn’t available to use for the twentyten theme (the twentyten theme only pulls images from your system and not from the media library). So I had to delete the image from my media library then reload it in the theme loader… sigh.
  2. The menus were setup but not enabled. I simply had to choose the menu in the theme menu settings then save menus and I was up to speed. That was nice.

UPDATE (again):

  1. In the past, I typically just reloaded the MySQL tables to ensure the two blogs were identical, this isn’t as easy. Instead, I have the same two issues happening again AND I’m starting to get pingbacks from my own site. This is getting to be a nasty mess.
Posted in Web | Tagged | Leave a comment

Riding the local… [UPDATED]

With the upgrade to Snow Leopard, I took the opportunity to make my MacBook Pro, a better development machine. This meant creating a Web server environment which matches my production shared hosting environment.

Far easier said then done.

I started with MAMP. I wanted to have a complete server environment that is well supported by the community and was easy to maintain. I felt that MAMP met these goals better than going with the native OS X web environment. Apple hasn’t been the best at offering the latest stable release of Apache, MySQL (in fact, not supported at all) and PHP. MAMP offered all three plus PHPMyAdmin (handy at times) and a smattering of additional goodness.

Using Sequel Pro (a fantastic, freeware MySQL GUI), I was able to create the databases required for my films and WordPress.  [A quick plug for Sequel Pro, they took the very nice code from CocoaMySQL and created a phenomenal tool. Well worth free, I gave them $50 for my copy, please donate if you can.]

Changing the link references from my hosted version to a MAMP version wasn’t hard. Unfortunately, I wasn’t thinking clearly. Having a blank PHP page tends to do that… All the errors were mine. (Remember to put a closing slash on a directory link and MAMP references require a port number.)

The hard part was duplicating WordPress. I finally kludged it by creating a fresh install of WP on MAMP then hand editing the WP database links to match my MAMP configuration.  It’s working now but I’m worried about my first upgrade. I also had to go through my site and switch all references to a .com site to the localhost (MAMP) site.

But at an absurdly high level to create a local WP site from a working hosted site:

  1. Install MAMP
  2. Fresh install WP onto MAMP site
  3. Copy the wp-content folder from the hosted site to the MAMP site
  4. Export the hosted WP MySQL database and import it into the MAMP MySQL database
  5. Hand edit the links in the “-options” table to match those required for the MAMP site (remember to edit the uploads option as well)
  6. Test. I turned off my wireless so I knew I was only local.

As soon as I finish this post, I’ll need to figure out how I’m going to duplicate this entry locally. I have two options, one, I could copy the text from my post page into the post page on the local site or two, export the hosted MySQL db and import it in to my local site. The latter would require me to hand edit the options page again. (or I could try keeping it the same). Mmmmmm.

UPDATE: Using two tabs on my browser, it took 30 seconds to duplicate the entry. Copy/Paste, Copy/Paste, click, click, click. That wasn’t so bad!

UPDATE July 8th, 2010: As I migrated to WordPress 3.0 locally (went from 2.84 to 3.0), I needed to reacquaint myself with using WordPress locally. Here are the directions in greater detail in updating WordPress locally (this is a personalization of the detailed upgrade installation on the WordPress Codex):

  1. Backup MySQL database using Sequel Pro; File – Export – MySQL Dump (select all tables and make sure Drop Table, Create Table and Add Table Content are all selected. Use this backup to create backup MySQL database for the backup old installation, I called it oldBackup. Use the Database Administration part of Sequel Pro to create a new database then Import the dump.
  2. Duplicate the oldblog directory using Finder – Duplicate then rename i.e; “oldblog28”
  3. Verify new site works by doing the following:
    • Export only the wrp_options table using Sequel Pro
    • Using Textmate, change all references of the blog directory to the new name i.e; oldblog to oldblog28 and (if necessary) make sure all www references are changed to local i.e; wellys.com:8888 to wellys.com:8888 (this is for MAMP running WordPress locally)
    • In the oldblog28 wp-config file, change the name of the database to oldBackup
    • Load the new site into Safari and confirm links are pointing to the new directory, browse the site a bit to ensure it is a fully working backup.
  4. Back to the site being updated, deactivate ALL plugins.
  5. Download and extract the new WordPress package.
  6. On the old site, save the following:
    • wp-config.php
    • wp-content folder but delete wp-content/cache and wp-content/plugins/widgets
    • wp-images (not found in oldblog)
  7. Open two windows in Finder and delete all files but the above 6 a-c. Move the new WordPress files over to the old directory. Using this method, you can methodically ensure you are updating/replacing all of the files. I had a little bit of work in the wp-content folder, making sure I didn’t delete any changes I had made to my blog.
  8. Log back into the blog and it should upgrade the database and site automatically. If unclear, go to: oldblog/wp-admin/upgrade.php
  9. Update .htaccess file if necessary (not necessary as of July 8, 2010)
  10. Install updated Plugins and Themes.
  11. Reactivate Plugins
  12. Add security key definitions to the wp-config.php file
  13. Review what has changed in WordPress.

NOTE: Based on information from http://www.chrisabernethy.com/why-wordpress-asks-connection-info/, I changed the ownership of the oldblog to _www using: sudo chown -R _www oldblog

Posted in Web | Tagged , | 1 Comment

A couple of things…

I haven’t updated the blog in quite a while. I’ve been working on a lot of things but haven’t found the time to document the work.

The latest thing I did was update this blog to 3.0. So far I haven’t seen a huge difference. I also changed the theme from “minamalism’ to twentyten, which is the new theme for WordPress.

I like the new them. Very simple, great style.

I will be exploring if I can use it as the basis for another site which isn’t a blog. The twentyten theme allows for custom menus so in some regards it could be used as a general blog site instead of a blog.

Posted in OS X, Tools | Tagged , | Leave a comment

DON’T HAND EDIT YOUR MAMP PHP.INI FILE!!!!

Oh, the agony.

I spent the better part of a day trying to get Xdebug working on my MAMP site on my Mac. I read here, here and here… all you have to do is to “edit your php.ini file” and bada-boom! you are off to the races.

No, no and no. The problem was that it kinda works, then it doesn’t, then nothing does, then things work but xdebug doesn’t.

Over the years, I have realized that when things start to get real hard, I’m doing something wrong, terribly wrong. Some where in some place, I’ve made the simplest of errors, creating a cacophony of bugs so bad, I’ve got to look down to see up.

I use MAMP, I also use MAMP PRO. Some scorn, I don’t because it seems to save me time. It would have this time, if I had RTFM’d. No, I didn’t. Instead I read what everybody else said “edit your php.ini file by hand”. WRONG!

Instead, use MAMP PRO’s  File-Edit Template command. It was RIGHT THERE!!

Thank you, Drupal. You saved my sanity. As for the rest, the rest of your information was pretty good, all except for…

Posted in OS X, Web | Tagged , | Leave a comment