-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifing a JSON file path with options for wp core install
command
#278
Comments
If you want a way to copy options from one site to another now:
Which will give you a sql dump file that you can import to another site to replace any existing options with the previous ones. |
In my SSG hack I am trying to keep the WP content in common human-editable files (like markdown for posts and JSON for options. I also wonder if the block editor in WP comes with its own markup language spec?). SQL format for options files also would work, but for more convenience JSON would be preferrable (as it's also the most basic format implemented in de/serialization in all programming languages and easy for working both manually and with any automation). So the feature could be specifying an options file (as JSON and/or SQL?) at the core install command invocation time for the |
Thats going to be outside the scope of wp cli I think (just to set expectations and that nobody is waiting on this to be implemented). The current JSON output from wp cli commands is there for easier parsing of output and isn't intended as a way to save data and pass it back and forth from WordPress installs since WordPress core has no support for that. SQL should be used for this purpose unless you want to write your own importer to handle JSON. |
when I tried to make it work and feed in it the values from |
Could be a convenience for specifying directly a JSON file with exported options to the
wp core install command
. Related to:I suggest that this would initialize the
wp_options
table from the values in the JSON file. The JSON file format should be the same as used inwp option list --format=json
command output. This would simplify usage of WordPress as a SSG engine (experimented with at https://github.com/vadimkantorov/wpssg)The text was updated successfully, but these errors were encountered: