Last active
January 21, 2022 09:26
-
-
Save baikaresandip/36cbd444028846de7d4f5d53a4ef5d7d to your computer and use it in GitHub Desktop.
Import WP Sample/Test data via WPCLI
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
# Import WP TESTS Data | |
# This needs the WordPress Importer plugin to be installed. | |
# Click on WordPress and install the WordPress Importer plugin, if it's not already installed, and click Activate Plugin & Run Importer after the installation completes. | |
# Change to your wordpress installation directory | |
cd $WPPATH | |
# Download the wp posts file by curl | |
curl -O https://raw.githubusercontent.com/manovotny/wptest/master/wptest.xml | |
# Import Media, Categories,Users, Posts via below commands | |
wp import wptest.xml --authors=create | |
#Remove the file | |
rm wptest.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment