How to setup a blog/website based on wordpress (incl. performance and search engine optimizations)

December 16th, 2009 by Sebastian Leave a reply »

After playing around with wordpress for some weeks now it’s time to write down some things to remember for the next times, you may find some things, that are interesting for you as well…

  1. preparation – for starting your new blog/website you need the following first:
  2. installation – the installation of your wordpress is pretty easy:
    • upload the content of the to your webspace (exactly you have to connect your ftp client to your webspace and copy all the files into your webspace)
    • create your database with the help of the admin-webinterface of your webhoster and note
      • DB_host (which is simply the name of the database server – mostly it ends with the domain of your webhoster i.e.
      • DB_name (which is the name of the database you create)
      • DB_user (which is the user you have to set a password for)
      • DB_password (which is the password of DB_user)
    • After that you just follow the Famous 5-Minute Install ;-)
  3. customizing – now you have a running wordpress instance and want to customize the look and feel of it:
    • first find a theme, that you like at, download it and upload it to your webspace into the directory named …/wp-content/themes/. After that you have to log into your running wordpress instance (http://<your_webspace>/wp-admin/) as admin and click on “Appearance/Themes” to enable your new Theme for your blog/website. Now go to http://<your_webspace> and check out your new design :)
    • Now you change some default settings that everybody changes:
      • change the password of the admin account – if you didn’t do so far you can find a link on the top of the dashboard ;-)
      • under “Settings/Permalinks” you should enable the beautiful permalinks (i.e. “Month and Name”)
    • You’ve heard that there are fabulous plugins for wordpress available? OK, one of the fancy ones you can find here, download it and upload it to your webspace into the folder …/wp-content/plugins/. After that log into your running wordpress instance as admin and go to “Plugins” to activate it. After that go to “Appearance/Widgets” and place “WP-Cumulus” (via drag & drop) in your sidebar. Now you need to produce some tags, so that it really looks fancy ;-)
    • fancy themes I’ve used are:
    • fancy plugins I’ve used are:
  4. optimizing – after you’ve played around with some themes and plugins you might feel that your blog/website is a bit slow in loading. If so, there are several things to optimize:
    • enable wordpress caching – you have learned now that wordpress is using php (which runs on the server and builds the html code on demand. Which means php is asking the database for a lot of objects when building the website for a requesting user (someone that opens your blog/website). This database questioning takes a lot of time and can be eliminated by caching. To enable that caching follow the instructions at
    • use the WP Super Cache Plugin
    • check your pictures about size and format and follow some rules (for editing you might use gimp):
      • for pics with few colors (like icons and buttons) use png
      • for pics with many colors (like photos) use jpg but set the quality to something below 96%
      • check the size (px*px) of the files
    • check if all activated wordpress plugins are really needed otherwise deactivate the unused
    • if you are not afraid of coding you will have fun with this:
    • furthermore you want the search engines to crawl your blog/website (this is called Search Engine Optimization – SEO) – That is done pretty simple by installing and enabling the wordpress plugin All in one SEO Pack. Sometimes SEO functionality is also included in the used wordpress theme – You can check that by viewing the html sourcecode of your blog/website (just use “View/Page Source” from the firefox menu), that should include lines with the following beginnings:
      • <meta name=”description” content=”…”>
      • <meta name=”keywords” content=”…”>
      • <meta name=”canonical” content=”…”>

      After installing and enabling the All in one SEO Pack plugin you can also check with that method if it is working ;-)

    • But that’s not all with SEO – there is another thing to know about: sitemap.xml. Therefor also a wordpress plugin exists. And if you wanna know wether the google bots can find your blog/website you should create an account for the Google Webmaster Tools ;-)

PHPhacks: I also have done one special need in one of my web projects: Show time and weekday of CET and PST on the website. The expected result was something like that: screenshot php magicsSo I’ve used the date() function of php to get the current time of the server (which is configured for CET). Then I’ve decreased it by 9 hours (9h*60m*60s) to get the pacific standard time.

echo date(‘G:i’) .”\n”; //generates the CET (server timezone) in 24h format
echo date(‘g:i a’, time() – (9 * 60 * 60)) .”\n”; //generates the PST in 12h format with am/pm

The weekday you can also get by the date() function of php…

echo date(‘l’); //generates the weekday of CET (server timezone)
echo date(‘l’, time() – (9 * 60 * 60)) .”\n”; //generates the weekday of PST

…had to be translated into German. That is simply done by using str_replace().

$wochentag = array(“Montag”, “Dienstag”, “Mittwoch”, “Donnerstag”, “Freitag”, “Samstag”, “Sonntag”);
$weekday = array(“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”);
echo str_replace($weekday, $wochentag, date(‘l’)) .”\n”;

Somehow I like php now, because it is a very helpful tool for pragmatic solutions ;-)


1 comment

  1. Because they didn’t finish reading the ebook they missed the part about how to use keywords or WordPress tags properly. This is a big deal because keywords or WordPress tags are used when indexing your articles with search engines. So if you want to get your article indexed by the search engines then you need to use the proper keywords or WordPress tags.

Leave a Reply