Automatically set permalink custom structure after WordPress installation

For setting the permalink structure that you want to be set automatically after WordPress installation, open the file schema.php from the directory /wp-admin/includes/ and set the value of permalink_structure of the array $options of the function populate_options that structure which you want to be set. Then open the file upgrade.php from the same directory and add $wp_rewrite->set_permalink_structure(get_option(“permalink_structure”)); just before $wp_rewrite->flush_rules(); in the function wp_install.

Advertisements
Leave a comment

1 Comment

  1. There is an easier way.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: