Skip to content
WP DEV – Elvin Haci

WP DEV – Elvin Haci

Instant Web Tools and Random Walk on WordPress Development

  • Quick Web Tools
  • My WP Blog
  • Articles
    • Common WordPress Development
    • WordPress + 3rd party
    • WooCommerce Development
  • About me
  • My Premium Plugins
  • Contact

Tag: rename old attachments

Posted on December 13, 2022January 25, 2023

Rename existing WordPress Attachments files, titles

Rename wp media object

If you change your website name, or you have to change some strings in existing imagedata of your website, we need to do the following steps:

Step 1: Fetch all attachments

Step 2: Rename all corresponding uploaded files

Step 3: update attachment data so that new files would be recognized by WP

Step 4: Update title, description data as well.

Here is a snippet which implements all 4 steps above.

Continue reading “Rename existing WordPress Attachments files, titles”

Get more useful WP tricks and snippets by subscribing to my mailclub.

follow us in feedly

Instant Functions for You

Word Cloud Generator - Visualize Popular Words in a Text

Vowel cleaner - Remove vowels from the text

Brain Illusions: Craft Surprising Negative Images

Hide Kids Faces, Maintain Privacy in Photos

List to Chart - Convert your list to pie, line, bar charts

Click for more

Top Posts

  • Unlock ChatGPT Plus with non-US bank cards
  • Remove pagination trails from WooCommerce Breadcrumb
  • Solving slowness of php mail() function
  • How to modify the output of any WordPress shortcode
  • How to create downloadable PDF link that works in all mobile browsers - Chrome, Safari etc.
  • How quickly get started with Open-AI DALL-E using PHP
  • Some Useful Codes on Programmatically Creating New Order in Woocommerce
  • How to Force a Plugin to Claim Compatibility with WooCommerce HPOS
Proudly powered by WordPress