---
title: "How to Export All WordPress Post URLs and Titles"
description: "Export all your WordPress post titles and URLs using SQL, WP-CLI, or a free plugin. Three methods, all take about a minute."
date: 2026-02-26
categories: ["wordpress"]
tags: ["wordpress","tips"]
---

import { Picture } from "astro:assets";
import imgPhpMyAdmin from "../../assets/images/wordpress/PHP-my-admin.webp";
import imgSqlTab from "../../assets/images/wordpress/sqltab.webp";
import imgSqlGo from "../../assets/images/wordpress/sql_goPNG.webp";
import imgExport from "../../assets/images/wordpress/export.webp";
import imgFormat from "../../assets/images/wordpress/choose-format.webp";

Sometimes you need a plain list of all your post URLs for a redirect map, an SEO audit, a migration, or just to have on hand. There are a few ways to do this. The SQL method below is the quickest if you have phpMyAdmin access. I've also added WP-CLI and plugin alternatives at the bottom.

## Steps

### 1. Open phpMyAdmin

Log in to your hosting control panel and click phpMyAdmin.

<Picture src={imgPhpMyAdmin} alt="phpMyAdmin link in hosting control panel" />

### 2. Select your database and open the SQL tab

Click your WordPress database in the left sidebar, then open the **SQL** tab.

<Picture src={imgSqlTab} alt="phpMyAdmin SQL tab" />

### 3. Run the query

Paste the following SQL, replacing the domain with your own:

```sql
SELECT post_title, CONCAT('https://yourdomain.com/', post_name)
FROM wp_posts
WHERE post_status = 'publish'
AND post_type = 'post';
```

If your table prefix isn't `wp_`, adjust accordingly (check the left sidebar for the actual table name).

Hit **Go**.

<Picture src={imgSqlGo} alt="Running the SQL query in phpMyAdmin" />

### 4. Export the results

A table of post titles and URLs appears. Click **Export**.

<Picture src={imgExport} alt="phpMyAdmin export button" />

Choose your file format (CSV works well for spreadsheets), set the delimiter if needed, and hit **Go**.

<Picture src={imgFormat} alt="phpMyAdmin export format selection" />

You'll get a file with every published post title and its URL. To include pages or custom post types, change `post_type = 'post'` to `post_type = 'page'` or remove the post_type condition entirely to get everything.

## Alternative: WP-CLI (if you have SSH access)

If you have SSH access to your server, WP-CLI is faster than phpMyAdmin for this. Run:

```bash
wp post list --post_type=post --post_status=publish --fields=post_title,post_name --format=csv > posts.csv
```

This exports titles and slugs to a CSV file. The `post_name` field is the URL slug, so you'd need to prepend your domain. To get full URLs directly:

```bash
wp post list --post_type=post --post_status=publish --fields=post_title,guid --format=csv > posts.csv
```

The `guid` field contains the full URL. You can add `--fields=ID,post_title,post_date,guid` to include post IDs and dates if you need them for an audit.

## Alternative: Export All URLs plugin

If you don't want to touch SQL or the command line, the free [Export All URLs](https://wordpress.org/plugins/export-all-urls/) plugin does this through the WordPress admin. It lets you filter by post type, status, date range, and author, and exports to CSV. It also includes categories, tags, and author data if you need them. Install, configure, export, then deactivate it when you're done.