June 28, 2010

Wordpress 3.0 installation from a command line

Many of use have been in that slow situation where you must download the zip of Wordpress, unzip it, and then FTP it to your web host. Today I bring gifts to those who have shell access, installation from the command line. I will give you all of the neat commands, and even a script to reduce the keyboard work.

Start by creating a database for Wordpress to run on.

Log in via shell you your web hosting account and execute the following commands with your own parameters for database name, user name, and password:
mysql
create database db_name_of_choice
GRANT USAGE ON db_name_of_choice.* to db_user_of_choice@localhost IDENTIFIED BY 'db_passwd_of_choice';
GRANT ALL ON db_name_of_choice.* to db_user_of_choice@localhost;

Write a Wordpress install file.

From the folder you would like to install Wordpress into, execute the following command:
vi installWP.sh

Copy+Pasting with VIM can be accomplished using the following key commands:
Press "a" to allow for text entry in VIM.
Press CTRL+V to paste the following lines of code into VIM.

Now copy+paste the following commands in:
wget http://www.wordpress.org/latest.zip
unzip latest.zip
cd wordpress
mv * ../
cd ..
rm -R wordpress/
echo "### Removing latest.zip install files ###"
rm -R latest.zip
mv wp-config-sample.php wp-config.php
echo DONE!

Now save the file
ESC
Press SHIFT+":"
type: wq!
Press RETURN/ENTER

Run the install file.

Change the permissions on installWP.sh so it can run as a shell script.
chmod 755 installWP.sh

Now run installWP.sh
./installWP.sh

Setting the database settings in wp-config.php.

With Wordpress now downloaded, and extracted from the zip file we need to configure our database name, user name, and password in the wp-config.php file.
vi wp-config.php

Find the following lines, and add your database settings from before:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'db_name_of_choice');
/** MySQL database username */
define('DB_USER', 'db_user');
/** MySQL database password */
define('DB_PASSWORD', 'db_passwd');

Key VI Commands
Press "a" to allow for text entry in VIM.
ESC to exit text entry.
Press SHIFT+":" to run save or exit commands
type: wq! to write the file, and quite.
Press RETURN/ENTER

Installation complete!

The Wordpress application is now setup, and is ready for in-browser configuration. Browse to the location where you installed Wordpress and you should see the following screen.

Wordpress 3 Install

Answer a few configuration questions and you will be up and running.

~Nathan Hein

June 21, 2010

Google’s Command Line Tool

Now I do not want to set a precedent here that I only post when Google releases a new tool, but unfortunately this is the most exciting thing since the Google Font API. GoogleCL, Google’s new Command Line tool, comes with access to Blogger, Calendar, Contacts, Docs, Picasa, and Youtube. I dislike Google as much as the next guy, despite using Gmail, gDocs, gCalendar, and having and Android phone, but you have to admit this really covers the gamut of what we use the web for most. The only thing missing is some kind of Facebook and/or Twitter utility via Google.

Google Project Page: http://code.google.com/p/googlecl/

Google’s Blog post announcing CL

Five Really Handy Google Command Line Tricks

~Nathan Hein

May 19, 2010

Google’s Font API Released Today

Today Google released their Font API giving the web a free choice for high quality open source web-safe fonts. Not only are these fonts easy to use, they are also supported across most browsers including Internet Explorer 6. How easy? You call the Google Font API through a single line of code, and then reference the font-family to your heart’s desire in the style sheet.

How to use Google’s Font API

1. Insert linke to Google’s Font API in the HTML:
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Droid+Sans" >
2. Then just reference the font family as you normally would in the CSS:
elementName { font-family: 'Droid Sans', serif; }
3. That is it. You are done. I present to you Droid Sans:

Droid Sans in all of its glory

Further Documentation on Google’s Font API

Google’s Font API Directory: http://code.google.com/webfonts This is where you can preview all of the fonts available, a Font Book if you will, and read Google’s documentation regarding the api.

Google’s documentation on the browser specific behavior:
http://code.google.com/apis/webfonts/docs/technical_considerations.html#Browser_Behavior

Video demo from Net Tuts

~Nathan Hein

May 18, 2010

Ad design & performance testing

This week I have been working on designing a few online ads for a client to drive traffic to their blog. It has been awhile since I have assembled a targeted ad like this so it is a lot of fun bringing the concept to life. With the amount of ads we have designed and how pleased the client is, I am pushing to utilize Google Optimization for some A/B testing of the ads. By using A/B testing we can isolate which ad drives more traffic to the client’s blog. Beyond the obvious benefits of driving more traffic, it will also open the door wider with this client to perform more A/B testing on their site so we can really tune the site’s lead generation performance.

~Nathan Hein
Older Posts »