Last week we updated the web site for Slipstream Longboards. I made it together with Daniel Lundgren on Medium Distribution.
As previous years we have a strong product catalogue area on the web site.
In 2012 we are really growing our team with at least 3 new team-riders and we are adding a new area for the team on our web site with both a blog and rider profiles. We are also adding a new map with all our European dealers, we are lifting all artists making graphics to us and all collaborators we have worked with. Oh! And we’re also making a brand new board matrix that helps you chose the right board!
We’ve also put the first version of Slipstreams e-commerce site live!
A while ago we discussed web sites. We talked back and forth and after some discussions we agreed to start with a small, tight and easy to use web site. Based on a system where they themselves could update everything. And focus on getting used to put up information on the web. Just keeping it simple.
I have been using WordPress for several web sites. It’s a fantastic software package. The right balance between complexity and limitations with a high finish and great usability. In the past I have recommended to buy a web host and install WordPress there. This time we are using WordPress.com and letting them host the site.
It’s easy to set up. You register an account and a blog name on WordPress.com. The default URL was http://specialrosteriet.wordpress.com/ in our case. We started to build the web site with this address to get a feel for it. We created a custom top banner image with their logo and pointed their own URL, http://specialrosteriet.se/, to WordPress.com.
There are some main advantages. You don’t need to make the security updates to the WordPress software yourself, it’s cheap, you get 3 GB of storage and unlimited bandwidth usage. Tying your domain name to WordPress.com costs you about $10 per (+ the name fee to your registrar, about $10 per year).
The greatest disadvantage is that you loose flexibility. You cannot install your own plugins and you are more limited in theme design. Currently that’s not a problem but when it is I’m sure it will be a fairly easy process to migrate the data to another system.
It’s easy to take small steps using this technique. They could do most of it themselves. Just having me to ask and explain. So far I have only good things to say about using WordPress.com for these types of web sites.
At work we always have a pretty hefty development environment. At home I’ve never had any dedicated environment for my web development. It’s both a relief and something I miss.
Today I’ll try to set up a WordPress development environment that’s a bit more robust than my old setup where I download the file I need to change from my website to my desktop, change it, upload it and refresh the browser.
I download the theme I want to use from WordPress Themes. I add -ol to the end of the theme folder to not confuse the themes with the original folder names. Then I check it in. This is done to easily be able to track my changes compared to the version I started out from later. Both to be able to see what I have done but also to easily be able to merge updated theme versions further down the road.
I change the styles.css file and add some information. Here is an example from the Simplr-ol style.css file.
THEME NAME: Simplr-ol
THEME URI: http://code.google.com/p/mypersonalblog/ (Simplr http://www.plaintxt.org/themes/simplr/)
DESCRIPTION: My customizations to Simplr; "The original minimalist one-column, content-centered theme for WordPress. A different type of theme. For WordPress 2.6.x."
AUTHOR: Ola Lindberg (Simplr by Scott Allan Wallick)
AUTHOR URI: http:///olalindberg.com/wp/ (Simplr http://scottwallick.com/)
TAGS: variable width, fixed width, one column, widgets, theme options, options page, white, orange, blue, microformats, hatom, hcard
If any theme diverges a lot from the original theme I’ll maybe come up with a new name and upload it to WordPress Themes. For now I think it’s good enough to have them all in one Google Code repository.
Setup VirtualBox, Ubuntu, Apache and WordPress
I installed VirtualBox, created an Ubuntu appliance and installed Ubuntu 9.10 desktop. I installed the guest add-ons and Apache. I changed the VirtualBox network to Bridge mode so it get’s its own IP address.
Update 101118: I recently wanted to make this setup on another computer (using a wireless network card) where I couldn’t get the Bridged Adapter to work. I searched around a bit and it and it seemed like some people had similar issues. Instead I configured VirtualBox to use two network cards. One using NAT (giving internet access) and one using Host-only Adapter.
With this setup you should access you guest os from your host os with the IP address your 2nd network card gets (in Windows).
I created an Apache Virtual Host and installed WordPress to that folder. The production URL is http:///olalindberg.com/wp/ and for the local URL I use http://o/blog. I added the IP for my virtual Ubuntu to the name o i my hosts file. Now I can surf to http://o/blog.
My virtual host is configured like this
#Only put the log file like this in the web root on a local server
CustomLog /home/ola/shared/web/ola/ola-access.log combined
Share files between my workstation and the virtual Ubuntu server
To share files in VirtualBox I use SharedFolders. The folder on my Windows workstation where I checked out the repository is D:CodingMyPersonalBlog and it’s mapped to the name MyPersonalBlog in Ubuntu.
To mount the folder MyPersonalBlog to /home/ola/MyPersonalBlog in Ubuntu you run the following from an Ubuntu terminal
sudo mount -t vboxsf mypersonalblog /home/ola/MyPersonalBlog
Make sure that the files are visible in you Ubuntu server by running ls -la in the folder.
Note! You need to run this every time you login or you can create a script and make it auto run.
Now I can enable the themes in the WordPress admin panel.
Note! If WordPress can’t see the themes look at the permissions for the shared folder. I set mine to 0777 since it’s a local setup.
Import all posts from the production setup
I use the build in WordPress feature to export all posts and pages to an XML-file. I import that file to my local setup. I include all attachments. Some minutes later I have all my posts in my local development environment.
If I need to re-import all posts I use the plugin Bulk Delete to empty my current local database. Then I empty the Media Library in the WordPress admin panel. One tip is to increase the number Media items per page via the Screen Options.
I installed Aptana, created a project file and added all my theme files to it. I have never used Aptana before so it’s a test. We’ll see how it goes.
Warning: move_uploaded_file(/var/www/home/ola/public_html/uploadify/uploads-folder/test-image.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/ola/public_html/uploadify/_lib/uploadify.php on line 40
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php1rJUsg' to '/var/www/home/ola/public_html/uploadify/uploads-folder/test-image.jpg' in /home/ola/public_html/uploadify/_lib/uploadify.php on line 40
I guess it’s some rewrite issues when Apache rewrites the /home/ola/public_html folder to /~ola.
I opened uploadify.php (the ”server side code” for Uploadify) and replaced: