WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#36550 closed feature request (wontfix)

write wp-admin >> settings to textfile instead of database

Reported by: Dreimorgen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Currently all the setting in WordPress are accessed via the wp-admin GUI and saved into the database.

Sublime Text, the editor, for example saves its settings into a json-style file.

It would be valuable to have the settings saved in a textfile for two reasons:

  1. It can be version controlled
  2. It could be prepared and dropped into new projects

For SysAdmins and Webdevelopers this would make it easy to automate the creation of a new WP Site and have a reusable set of personal settings.

This would not interfere with the standard GUI, wich should stay for regular user, but only be an enhancement.

Proposed Example (/wp-settings.json)

{
  "blogname":"My WordPress Site",
  "blogdescription": "Another WordPress Site",
  "site_url": "http://www.wordpress.org",
  "home_url": "http://www.wordpress.org",
  "admin_email": "mail@example.com",
  "users_can_register": false,
  "default_role":administrator,
  // ...
}

Change History (3)

#1 follow-up: @swissspidy
3 years ago

  • Focuses administration removed

Seems like this would need a ton of work to maintain backwards compatibility with developers expecting the settings in the database, most probably some are even making direct SQL queries. Since there are pros of cons to either method (database vs. files), there's no need to change this in core right now.

Instead, there are plugins that can do something like this just fine. See https://github.com/danielbachhuber/dictator for example.

#2 in reply to: ↑ 1 @Dreimorgen
3 years ago

Replying to swissspidy:

Seems like this would need a ton of work to maintain backwards compatibility with developers expecting the settings in the database, most probably some are even making direct SQL queries. Since there are pros of cons to either method (database vs. files), there's no need to change this in core right now.

Instead, there are plugins that can do something like this just fine. See https://github.com/danielbachhuber/dictator for example.

thanks for the feedback! I'd assume it would be a problem because it's pretty complex. It was more of an idea anyways. I have never heard of Dictator before, it seems to be doing what i want, thanks for that, i will check it out! ~ff

(should this ticket be closed?)

#3 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.