linkbarrett
Newbie
- Jun 25, 2009
- 12
- 6
I just found out this cool trick for customizing wordpress during install. This saves a lot of time if you're installing a bunch of sites. For example, I like to disable comments and enable XML-RPC posting. All you have to do is stick a file "install.php" in your wp-content folder. Inside, put something like this:
You get the idea. Check out the function wp_install_defaults in wp-admin/includes/upgrade.php for more things you can do, like adding pages and posts. Big time saver.
PHP:
<?php
function wp_install_defaults($user_id) {
update_option('default_comment_status', 'closed');
update_option('permalink_structure', '/%year/%month%/%postname%/');
update_option('default_ping_status', 'closed');
update_option('enable_xmlrpc', '1');
}
?>
You get the idea. Check out the function wp_install_defaults in wp-admin/includes/upgrade.php for more things you can do, like adding pages and posts. Big time saver.