Created
August 24, 2016 23:42
-
-
Save jsoningram/7de72b0beee8fce978794680381b11ec to your computer and use it in GitHub Desktop.
Export Yoast redirects to CSV file
This file contains 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 | |
$array = get_option('wpseo-premium-redirects'); | |
foreach ( $array as $key => $row ) { | |
file_put_contents( ABSPATH . 'redirects.csv', $key . ',' . $row[ 'url' ] . "\n", FILE_APPEND ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment