zoot

open source technology blog - revamp in progress

Migrating WordPress

Thursday September 25, 2008 @ 10:56 AM (GMT)

Here’s a quick method for migrating your WordPress blog from one hostname to another, for example http://some.domain to http://other.domain (on the same server). This method was tested on WordPress 2.6.1 with a MySQL database, but should be universally applicable. This method assumes you have shell access.

Create a backup directory

# mkdir ~/backup

Backup the WordPress filesystem hierarchy

# cd /path/to/website/root
# tar czf ~/backup/wordpress_sitename.tar.gz .

Backup the existing WordPress database

# cd ~/backup
# mysqldump -u db_user -p db_name > wordpress_db_name.sql

Make a copy of the existing WordPress database backup

# cd ~/backup
# cp wordpress_db_name.sql wordpress_new_db_name.sql

Edit wordpress_new_db_name.sql and replace all occurrences of some.domain with other.domain
(the following example is for the vi editor)

# vi wordpress_new_db_name.sql
:1,$s/some.domain/other.domain/g

Create the new WordPress database

# mysql -u root -p
mysql> create database new_db_name;
mysql> grant all on new_db_name.* to 'db_user'@'localhost' identified by 'your_password';

Restore the existing database into the new one

# cd ~/backup
# mysql -u db_user -p new_db_name < wordpress_new_db_name.sql

Modify the database name in wp-config.php

# cd /path/to/website/root
# vi wp-config.php
define('DB_NAME', 'new_db_name');

That’s it :)

Blog now powered by Thoth

Friday September 19, 2008 @ 12:18 PM (GMT)

I’ve upgraded Thoth to the bleeding edge version (0.3.0) and am now finally able to save a post, or page as a draft. I love simple applications which do their job well, without unnecessary bells and whistles.

Assuming a fresh installation:

gem install manveru-ramaze --source=http://gems.github.com/
gem install sequel
mkdir -p ~/build/thoth
cd ~/build/thoth
wget http://github.com/rgrove/thoth/tarball/master -O thoth-master.tar.gz
cd rgrove-thoth-265d2921ec072543951107c30b7d8092b48348a9
rake install

Blog engines revisited

Friday August 15, 2008 @ 09:45 AM (GMT)

My blog engine research continues. This week I’ve test-driven the following, well-known platforms.

Typo (Ruby on Rails)
Textpattern (PHP)
WordPress (PHP)

The most striking aspect of how my impression of these has been shaped, relates to the documentation and resources available. WordPress wins, hands-down. I’m not surprised in the least as to why WordPress is so popular; it is accessible in the extreme. Installation was trivial and a plethora of information on extending the platform through plugins, themes and other modifications, is available on the WordPress website.

I shall continue my appraisal of all of the above as soon as I have more time to spare.

Note however, despite my enthusiasm for WordPress, my blog will, for the time being, remain powered by Thoth. It’s simplicity, speed and ease of use for someone of my technical ability overshadows my desire to use something shiny like WordPress, which includes so many features, bar the kitchen sink and a cappuccino machine.

More to follow …

Go ahead, send me ...

Friday August 08, 2008 @ 10:32 AM (GMT)

The title of this post is part of the slogan for the DSPAM content based SPAM filter, which is a component of the arsenal of chained-together tools which my business uses on its servers to combat unsolicited email. DSPAM is extremely accurate, if setup and ‘trained’ correctly.

This post is really about another component of zootzone.com’s anti-spam tool-kit, an SMTP server called qpsmtpd. We block thousands of suspicious SMTP connections a day, before the unwanted messages are even queued to disk! That being said, the mail servers on our infrastructure are now running under a vastly reduced load, given the reduced volume of SPAM to process prior to delivery to users’ mailboxes.

What is so powerful about qpsmtpd, is that one can write plugins which intercept the SMTP communication at various stages, from the initial connect, right through to the DATA submission phase. An example would be the blocking of connections from dial-up, or DSL connected computers, which are inadvertently compromised SPAM zombies, or people sending SPAM to earn extra money. If you’re a system administrator, or ISP decision-maker, it is in your best interest to implement this incredibly powerful SMTP server.

Blog now powered by thoth

Wednesday June 04, 2008 @ 12:27 PM (GMT)

I’ve switched my blog from Mephisto to thoth .

I’m a huge fan of simplicity and really like the way this little blog engine works. Written using the Ramaze Ruby web application framework which I mentioned in my previous post, it outperforms Mephisto by a looooong shot! The admin interface is also integrated into the main site as contextual toolbar icons, unlike other blog engines, which have separate and often over-complicated admin interfaces. Sweet :-)

There are a few features which I’d like to see included in thoth, like modifying the post date, page categories and blog post categories. Fortunately thoth appears to be simple to extend through plugins, so I will be tweaking things in future. In the meantime, I will have to resort to manually changing the blog post times of my previous posts which were created while using Mephisto.

Web application frameworks

Wednesday June 04, 2008 @ 12:09 PM (GMT)

These frameworks are the new craze for rapidly developing database driven web sites. I’m particularly interested in Model View Controller (MVC) frameworks, which assist in separating process flow, data management and the final presentation. For information on web application frameworks visit the Wikipedia page on the topic.

I’m hunting for a suitable framework to use to build a new web based service. Amongst the current candidates, after pouring over countless options, are:

Some may ask why Ruby on Rails isn’t on this short list. Well, the answer is simple – it’s too bloated for my needs. Ramaze and Merb appear to be a lot more flexible. I neither wish to be dictated to, nor forced to rummage through an oversized project hierarchy to tweak my code. Of the two Ruby based frameworks, I’m drawn more to Ramaze, but have to understand what RESTful applications are before I ditch Merb. More on this later.

Now, for the Perl based CGI::Application framework. Well, I have programmed in Perl for years, my language of choice for getting things done, for web applications and practically everything else including system administration. Then, there’s the Comprehensive Perl Archive Network (CPAN) which is home to a plethora of Perl modules which gives one an incredible tool-set. This framework is very light and as with what I understand of Ramaze, doesn’t dictate as to how I should structure my projects.

The search isn’t over yet, even though I continue to gravitate towards Ramaze and CGI::Application.

I will report back with my final decision and hopefully some compelling reasons for the decision :-)

Copyright © 2010 zoot. All rights reserved.
Powered by Thoth.