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

 

Bootstrap 4 books - learn responsive web design for beginners

Want a Bootstrap Reference Book?

Learn More

Advertise Here

Written by: Jacob Lett - Jacob is an experienced website designer and developer who specializes in building HubSpot CMS themes. He helps Industrial companies optimize and leverage their website for awareness, lead generation, and branding.
Category: Code Snippets
Tags: ,

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.

Bootstrap 4 books - learn responsive web design for beginners

Want a Bootstrap Reference Book?

Learn More

Advertise Here