How To List All WordPress Post URLs? – Get Entire WordPress Post List

Last Updated on

I recently had a apply a 301 redirect to about 20 post on a small WordPress site.

As you might already know, there are many easy to use 301 redirect WordPress plugins so all I needed was a list of all the posts on the site.

Why oh why? No WordPress post list in the database!

So the first place I looked was the database.

I thought I could just export the entire post URLs from there but that was not possible because there simply isn’t a table in the database that list the URLs with permalink.

My next thought was there must be a plugin. As it turned out, there is a very old plugin that seems to do what I was hoping it would do.

After checking on the web further, I managed to find a simple solution thanks to this forum post on

The solution to list all post URL in WordPress

Essentially, here are the steps.

1) Copy and paste the following code in a new text file.

2) Then save it with “.php” extension such as “postlist.php” and upload it to the “wp-content” sub-folder.

3) Open it up in the browser

Nice and simple!



0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *