WordPress Installation Tips
If you are like me, using WordPress as your main frame, you’d understand how annoying it is to remove default data that comes with installation. WordPress automatically throws in a post, a comments and some default links. Instead of deleting them manually, I customized the installation file to avoid putting in the default data. In this post, I will show you how to acheive this and hopefuly save you some installation time.
Download customized installation file here ( WordPress1.5 )
Download customized installation file here ( WordPress 2.0)
or do it manually
For WordPress 1.5 and 2.0
1) Open installation.php from wp-admin folder.
2) At the bottom of the file, find Now drop in some default links
3) Remove the following lines as needed.
Remove this code to remove default links
// Now drop in some default links
$wpdb->query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name) VALUES (1, '".$wpdb->escape(__('Blogroll'))."')");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://blogs.linux.ie/xeer/', 'Donncha', 1, 'http://blogs.linux.ie/xeer/feed/', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://zengun.org/weblog/', 'Michel', 1, 'http://zengun.org/weblog/feed/', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://boren.nu/', 'Ryan', 1, 'http://boren.nu/feed/', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://photomatt.net/', 'Matt', 1, 'http://xml.photomatt.net/feed/', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://zed1.com/journalized/', 'Mike', 1, 'http://zed1.com/journalized/feed/', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://www.alexking.org/', 'Alex', 1, 'http://www.alexking.org/blog/wp-rss2.php', '');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://dougal.gunters.org/', 'Dougal', 1, 'http://dougal.gunters.org/feed/', '');");
Please leave this code as is. Do not edit this.
// Default category
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_count, category_description) VALUES ('0', '".$wpdb->escape(__('Uncategorized'))."', '".sanitize_title(__('Uncategorized'))."', '1', '')");
Remove this code to remove first post
// First post
$now = date('Y-m-d H:i:s');
$now_gmt = gmdate('Y-m-d H:i:s');
$wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, comment_count, to_ping, pinged, post_content_filtered) VALUES ('1', '$now', '$now_gmt', '".$wpdb->escape(__('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'))."', '', '".$wpdb->escape(__('Hello world!'))."', '0', '".$wpdb->escape(__('hello-world'))."', '$now', '$now_gmt', '1', '', '', '')");
$wpdb->query( “INSERT INTO $wpdb->post2cat (`rel_id`, `post_id`, `category_id`) VALUES (1, 1, 1)” );
Remove this code to remove default comment
// Default comment
$wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_date_gmt, comment_content) VALUES ('1', '".$wpdb->escape(__('Mr WordPress'))."', '', 'http://wordpress.org/', '$now', '$now_gmt', '".$wpdb->escape(__('Hi, this is a comment.
To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.'))."')");
Remove this code to remove default page
// First Page
$wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, to_ping, pinged, post_content_filtered) VALUES ('1', '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(__('about'))."', '$now', '$now_gmt', 'static', '', '', '')");
generate_page_rewrite_rules();
4) Save it and you are done :)

November 25th, 2006 at 4:52 pm
Hello, Thought I’d enter something, because your site like for me. Great Blog!
July 8th, 2006 at 12:02 pm
Great post about making WP much more enjoyable to install and configure.
Gettinjg rid of the that “default” stuff sure took a lot of time, but with your slight “mods” I can now get a WP blog up and running in no time flat..
Thanks for this.. much appreciated.
April 27th, 2006 at 11:44 am
Bo you got some comment spam here ;-)
March 9th, 2006 at 1:21 pm
I wondered how you located this information? I have looked everywhere and was never able to find more info about it other than here.
March 4th, 2006 at 12:24 pm
First Time here and I like this stuff.Well done!
March 3rd, 2006 at 4:08 pm
Very good topic to share with us. Great info.
February 28th, 2006 at 4:48 am
Hi Interesting topic! Thank you for your information. Greetings from the one and only Rich Jerk.
February 14th, 2006 at 12:21 pm
Congratulations for your blog, it is very nice to read. Do you have a feed?, Uradus
February 10th, 2006 at 3:58 pm
I was searching the web and found your entry. I really like your site and found it worth while reading through the posts. I am looking to publish a comprehensive site reviewing many different articles and blog. Please feel free to take a look at my blog at computer training course
and add anything your want.
February 10th, 2006 at 3:51 pm
I was searching the web and found your entry. I really like your site and found it worth while reading through the posts. I am looking to publish a comprehensive site reviewing many different articles and blogg. Please feel free to take a look at my blog at a href=”http://www.remote-control-codes.org”>rca remote control codes and add anything your want.
February 10th, 2006 at 12:11 pm
Good writing. Do you have an RSS feed where can I suscribe? I tried using bloglines but couldn’t.
February 3rd, 2006 at 4:12 pm
This is a really good blog! Congratulations for your work. It’s interesting and smart. In fact, my sister and I think that you may be perfect to work for us in our project about FTP hosting. We will write you very soon. Keep up the good work.
January 14th, 2006 at 10:22 am
Hi. Maybe it’s not to place to ask but.. I must learn about it:
Is there a difference (in matters of SEO) between launching a blog at wordpress.com and hosting the wordpress on my own host?
I think that theblog.wordpress.com will crawled and indexed very fast because of the PR of main domain wordpress.com, but I’m not sure at all.
Once being indexed, will theblog.wordpress.com perform better in SERP, than the same blog on my own host theblog.com?
Thanx a lot!
January 14th, 2006 at 3:54 am
Just one more note, this implementation will be worth your time only if you are installing WordPress constantly.
January 14th, 2006 at 3:52 am
Lin,
install.php is located under wp-admin/
you can edit from your pc before you upload the file.
January 14th, 2006 at 3:45 am
Thanks Bo! I am amazed how you know whar I am working on!
Okay, I downloaded but can anyone tell me in more detail how to / where find the “installation.php ” file. or is it install.php?
Okay do I edit it on my computer or on my server?
Any details would be helpful:)
Thanks in advance,
Lin
January 13th, 2006 at 8:57 pm
Thanks Bo!
I was getting a bit frustrated at all the default things.
Now I can make a new blog and save some time!
Joel