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.

  • Share/Bookmark
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Leave a Reply