Just encountered the same issue.
Turns out it’s because the csv library requires at least PHP 5.5.
Thus, the plugin has the same requirement…
I’m gonna try another plugin or export the urls manually with some sql queries.
Easier way to get a simple csv of all published posts and pages : create a php file somewhere in your WP install folder with this content :
<?php
include 'wp-load.php';
function fetch_posts(){
$args = array(
'post_type' => 'any',
'posts_per_page' => -1,
'post_status' => 'publish',
'suppress_filters' => false
);
$posts = new WP_Query($args);
$posts = $posts->posts;
foreach((array) $posts as $post){
switch($post->post_type){
case 'revision':
case 'nav_menu_item':
break;
case 'attachment':
$permalink = get_attachment_link($post->ID);
break;
case 'page':
case 'post':
default:
$permalink = get_permalink($post->ID);
break;
}
echo "\n{$post->ID}\t{$post->post_type}\t{$post->post_title}\t{$permalink}";
}
}
header('Content-type:text/plain; charset=utf-8');
echo "ID\tType\tTitle\tPermalink";
// we need all languages if wpml is installed
if(function_exists('icl_get_languages')){
$languages = icl_get_languages('skip_missing=0');
foreach((array) $languages as $lang){
// change language
do_action('wpml_switch_language', $lang['code']);
fetch_posts();
}
}
else {
fetch_posts();
}
Access it directly with your browser (or run it via some cli).
-
This reply was modified 9 years, 3 months ago by
hardesfred.
Sorry guys, yes it is 5.5 min, I will add it to the readme and update to make sure it doesn’t break anything when 5.5 is not there.