How to Get a List of WordPress PDF, Image, Post, or Page URLS

  • read
  • Add to Flipboard Magazine.

Below are two PHP scripts you can use to help get a list of URLs of content in your WordPress site. I use these when I am migrating posts or media library files to another sites without using a plugin.

Follow the steps below to use these scripts

  1. Open a text editor and copy and paste one of the code blocks and save the file as get-urls.php
  2. Upload the get-urls.php file to the root directory of your wordpress install not your themes folder
  3. In your browser go to yourdomain.com/get-urls.php

Get List of Attachments

Once you have your list of URLS you can use this handy chrome extension to download them into a folder.

 

Get List of Pages

Regex Find and Replace Old domain with New One

 

Written by: Jacob Lett - Jacob is a marketing and web design consultant who helps manufacturers grow their revenue. Unlike his competitors, he focuses on small and consistent website design changes to increase results. He recently created the Industrial HubSpot Theme to help manufacturers quickly build their website on the HubSpot platform.
Category: Code Snippets
Tags: ,

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.

The Artistic Side of web design 1

Advertise Here