List the urls of all posts in a wordpress blog

2 replies
I am trying to find a way to scrape, generate, or use a plugin, to list of all the post urls on a Wordpress blog. I want to make a line limited list so I can ping them.

Does anyone have an idea on how to do this? I searched the forum, Googles it, and Wordpress.org, but cannot seem to find anything.
#blog #list #posts #urls #wordpress
  • Profile picture of the author mojojuju
    Here's two ways to do it:

    Method 1

    A quick way to do this would be to use phpMyadmin. Just log in, select your wordpress database, and do the following query to list all published posts:

    Code:
    SELECT guid  FROM `wp_posts` WHERE `post_status` LIKE 'publish' AND `post_type` LIKE 'post'
    After you get the results, click on "Print View (with full texts)" and a new browser tab (or window) will open showing all the post urls in a table. You can copy those posts from the table to a text file and you're done.

    Method 2

    Create a file called list-post-urls.php in your wp-content directory.

    In this list-post-urls.php file, paste the following:


    HTML Code:
    <?php
    
    require_once('../wp-blog-header.php');
    query_posts('&showposts=-1&order=ASC');
    
    while (have_posts()) : the_post(); ?>
    
    <?php the_permalink(); ?>
    <br />
    
    <?php endwhile; ?>
    Then just call the script in your browser by going to http://www.yourblog.com/wp-content/list-post-urls.php

    You'll see a list of your posts that you can then copy to a text file.
    Signature

    :)

    {{ DiscussionBoard.errors[4792332].message }}
    • Profile picture of the author jackheape
      You are the man! Thanks. It worked like a charm.
      {{ DiscussionBoard.errors[4795133].message }}

Trending Topics