New answers tagged

0

Firstly, your upload_max_filesize is much smaller than your post_max_filesize which means that even though you can POST 100MB of data, PHP will only accept files in that POST data which are 8MB or less. Try increasing this limit. Secondly, are you sure that your php.ini is being loaded by your host? Not all hosts allow their tenants to load user php.ini. ...


0

it's file_put_contents which saves the data then it have to be in the hook and not in the body of the plugin : function export_posts_in_json () { $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, ); $query = new WP_Query( $args ); ... $data = json_encode($posts)...


0

This is generally not a good idea. See this WordPress database diagram. You need to consider: posts that have categories or tags (terms), their relationships, term meta, and taxonomies posts that have authors (users) posts that have comments things that are actually posts that you might not realise are posts (eg. almost everything in WordPress is a post - ...


0

Content includes the author user and comments (and probably more). Dumping just part of the DB as a way to export/import doesn't sound like a very robust idea. DBs are relatively small, and there is almost no reason not to export/import the full DB instead of trying to hack things.



Top 50 recent answers are included