Created
June 8, 2016 01:20
-
-
Save rakuishi/c36a03fad75d96334856607d406a7020 to your computer and use it in GitHub Desktop.
Export wordpress's tags data to csv
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
$ mkdir backup | |
$ chmod 777 backup | |
$ mysql -u root | |
> USE [DATABASE_NAME]; | |
> SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('post_tag') INTO OUTFILE "/backup/post_tag.csv" FIELDS TERMINATED BY "," ENCLOSED BY "\"" LINES TERMINATED BY "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment