Created
November 28, 2018 21:40
-
-
Save allysonsouza/83fb0097d52d1ec2fa5ad0d9e3cbdc41 to your computer and use it in GitHub Desktop.
Export WordPress XML content acessing this file. It supports the exports of more posts than it's supported trough the panel with the same server resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'wp-config.php'; | |
| include 'wp-admin/includes/export.php'; | |
| ob_start(); | |
| export_wp(); | |
| $file = ob_get_contents(); | |
| ob_end_clean(); | |
| $fh = fopen("wordpress-" . date('Y-m-d') . ".xml", 'w'); | |
| fwrite($fh, $file); | |
| fclose($fh); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment