Changing default options for multiple WP installations?
Hope, someone will be able to help…
I am moving my sites to WordPress. I have installed and set up my first blog successfully. Now, I am ready to move on to my other sites and would like to use the same options setup.
Is there a way to make custom options setup part of the installation procedure, so that I don’t have to change the default options for each new blog?
In other words, is there a way to change the default options setup to a custom one BEFORE I install the blog?
Thanks in advance for your help! 🙂
Yeah, there’s one way to do it: hack the “install.php” file and change the values there.
Thanks, pizdin_dim! 🙂
I suppose, I could also hack any of the options_*.php or other files in the /wp-admin/ directory?
if you go read the wp-admin/upgrade-schema.php, you wil find all the schema for the database, and the default settings for each feature… so it’s the proper place to modify things… no need to edit anyother file before installation of your blogs.
the install.php file is just for adding latest content to the database, it’s not the install process itself…
Thanks, nexia! This is exactly what I am after! 🙂
Any quick hint on how to modify the file, as not to mess up things? Say, I want to have the permalinks turned on by default using a custom URL structure. How would I modify the upgrade-schema.php file?
I am assuming that I should modify the code on line 190:
… but what do I do with it?
Thanks for your help! 🙂
“so it’s the proper place to modify things… no need to edit anyother file before installation of your blogs.”
That’s not true, strictly speaking. There are a bunch of things which could be changed in “install.php”, which affect defaults:
1. default links
2. default category
3. first post
4. default comment
5. first page
6. admin username
I recommend always changing (2) and especially (6) in almost all installations I’ve done so far.
Now, I am curious what the outcome of this discussion will be…
The way I see it, the install.php file contains only limited number of options that can be modified and, yes, it does make sense to modify the default admin username (for security purposes).
However, for my purposes, I need more than just the 6 options available in the install.php file. This includes, among others:
– custom permalinks structure
– admin nickname
– use of rich text editor
– admin email
– blog URL (include “www” as default)
– activated plugins
I suppose, these can be modified only in the upgrade-scheme.php file, so I would need to modify both files.
Btw, where does WP store the selected options AFTER the installation? None of the files discussed above seem to be written to.
“I suppose, these can be modified only in the upgrade-scheme.php file, so I would need to modify both files.”
Yes, that’s correct.
“Btw, where does WP store the selected options AFTER the installation? None of the files discussed above seem to be written to.”
In the database “options” table mainly. The user info is kept in the “users” table.
- The topic ‘Changing default options for multiple WP installations?’ is closed to new replies.