Custom WordPress plugin developed to automate the one-time migration of podcast episodes from Spotify into a WordPress website using a custom podcast post type. The plugin connected to the Spotify API to retrieve episode data, automatically created WordPress content, assigned embed iframes and featured images, and processed HTML descriptions using XPath to modify or remove specific sections before publication while preserving episode order through custom publishing dates.
What initially appeared to be a simple content migration task quickly became a process automation project focused on efficiency, consistency, and reducing the amount of manual work required inside WordPress.
The client needed to import a large podcast catalog hosted on Spotify into a WordPress website that already used a custom post type dedicated to podcast episodes. Each imported episode required a specific structure, including embedding the Spotify player through a custom field, assigning a shared featured image, and modifying certain parts of the episode description before publication.
Because the migration involved well over a hundred podcast episodes, manually creating each entry would have been unnecessarily repetitive and time-consuming. The objective was to automate the entire import process through a one-time migration tool capable of generating all podcast content automatically while respecting the existing WordPress structure.
To solve this, I developed a custom WordPress plugin tailored specifically for the migration workflow. The plugin connected directly to the Spotify API to retrieve episode information such as titles, descriptions, publishing data, and embed URLs. Using native WordPress functions, the plugin automatically generated all podcast entries inside the existing custom post type without requiring manual content creation.
One of the most important technical challenges involved processing the HTML descriptions returned by the Spotify API. Since parts of the content needed to be cleaned, modified, or removed before publication, I implemented XPath-based parsing to selectively manipulate specific sections of the HTML while preserving the remaining formatting and readability.
The plugin also generated custom publication dates during the import process to maintain the correct chronological order of episodes inside WordPress, ensuring the migrated catalog reflected the original podcast timeline accurately.
Once activated, the plugin completed the full migration automatically, transforming what would have been a repetitive manual process into a fast and reliable one-time import solution tailored to the client’s WordPress infrastructure.