You guys give up too easily 🙂
This worked for me:
<?php
require(dirname(dirname(__FILE__)) . '/wp-load.php');
require(ABSPATH . 'wp-admin/includes/admin.php');
require('includes/export.php');
ob_start();
export_wp();
$xml = ob_get_clean();
file_put_contents('out.xml', $xml);
echo "done"
?>
Related Posts:
- How can I export post data in xml format?
- How can I export data without using any import/export plugin
- Export User Info to CSV from Front End
- Export all post from database to JSON only when the database gets updated
- TCPDF get_post_meta outside the loop
- Export WordPress Table to CSV from page
- How to limit the content coming from wordpress shortcodes?
- How to properly loop through these external URLs to get them into the sitemap using this hook
- How to retrieve current wordpress profile page URL?
- How to make a XML/PHP file returning custom field data from page
- How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?
- Display image from an external rss feed on wordpress without plugins
- WordPress ajax-action failing because of newline in response
- SOAP Request/Parsing XML From wp_send_json_success
- Add valid XHTML closing img tags to WordPress galleries
- Custom CSV exporter – Cannot modify header information – headers
- Fetching review value using wpdb class
- Export post data with xml to other site using php soap
- WordPress create custom XML RSS feed template
- Export WordPress User Meta to CSV/Excel
- Import Instagram post as WordPress post
- How do I get data from my database into my Custom Export Field
- WordPress post insertion from PHP file
- Creating a WordPress addon for ContactForm7 submission (.XML file export)
- Dynamically Create Posts Via XML File
- Adapting a php array to WordPress
- How to export database correctly for local to online
- add conditionals to a displayed external xml feed
- how to iterate through xml data?
- XML WP_Query problem in PHP 8.0 and 8.1
- Read data from external source. XML vs REST API
- WordPress Custom API GET request from External App with XML Parameter
- Alternative loop syntax error [closed]
- How to strip/remove all blank spaces at the beginning/end of a search string
- why my “recepie” category is not taken into account in my request
- How can I execute $string = if();? [closed]
- Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in C:\xampp\htdocs\AttendanceSystem\resources\php\method.php on line 250 [closed]
- Parse error: syntax error, unexpected ‘}’ in C:\wamp64\www\Proiect\aplicatie\user_check.php on line 18 [closed]
- Adding php within a return statement [closed]
- How to add margin underneath woocommerce total price amount -> productpages
- Pagination in category.php not functioning
- Display post of specific category on page
- HOW TO Insert Existing PHP Code to WOrdPress
- where is the mistake in PHP Warning: Invalid argument supplied for foreach() in line 3
- How to show blog posts changing every time after refreshing the page in non-wordpress website?
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- Echo piece of code from file
- Adding placeholder text field to woocommerce checkout [closed]
- Query posts by custom fields (object post)
- Cannot modify header information – headers already sent
- Adding multiple emails to a
- Query Concatenation
- Send foreach $_post method to contact form 7 [closed]
- WP Debug enabled Undefined index error in a widget
- php 7.0 update to 7.1 and at least 7.2
- Warning: Cannot modify header information
- Can I have a php site on subdirectory of WordPress?
- How would I split the results into two columns [closed]
- ACF Date fileds to Age Convert [closed]
- is there away to hide php code in wordpress not to show in PAGES
- Displaying categories
- Whats wrong with my code? Need To add String to shortcode? [closed]
- Why this Read More Not working in Php?
- How to combine array info [closed]
- How to get the Woocoomerce subtotal value without tax in the hardcode? [closed]
- How do I get Roboto Google Font to display normal font-style? [closed]
- Select area and checkbox data is not saving?
- Save custom field value to variable for conditional – why is this not working? [closed]
- Shortcode always at top of content
- Populate checkboxes from array
- My title is showing after the shortcode
- Display popularpost posts of the last 2 days
- Cookie not created in AJAX request
- Display Sale Price Before Regular Price (WooCommerce)
- on category page get name of category as a string
- How do I reformat this to add php inside php?
- WordPress categories not working throughout site
- Query category name by variable
- Load a Header in wordpress
- Advanced custom fields Repeater conditional statement not working [closed]
- Load files content [closed]
- Using PHP for background-image property [closed]
- Where is the POST response body generated in PHP? [closed]
- Trouble figuring out how to get my button to submit comment
- How to include a php file in every post and page [duplicate]
- Link to external page has wordpress blog-url inside
- archive per year with monthly
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- Convert ACF checkbox choices to links [closed]
- How to modify this function to exclude also the post belonging to a specific category?
- Can’t find text source file in WP theme [closed]
- What does that mean: cannot use a scalar value as an array [closed]
- Using the wp_remote_post response body
- AJAX: WordPress filters inside $html do not work as intended
- How to insert a variable into a query parameter?
- wp_link_pages return value even when is condition inside if statement
- How to edit homepage in WordPress?
- Adding Custom JQuery Menu Fresh Slide Out
- How to quickly/easily make an analysis (reverse engineering) of WordPress?
- php nested IF statements to hide content (possible syntax error) [closed]