junaidbhura / fly-dynamic-image-resizer

Fly Dynamic Image Resizer plugin for WordPress
https://wordpress.org/plugins/fly-dynamic-image-resizer/
MIT License
162 stars 26 forks source link

Get attachment image issue #54

Closed ivankatic closed 2 years ago

ivankatic commented 2 years ago

After migrating a site to a new domain and server, fly_get_attachment_image_src returns empty arrays on the whole site. Other than changing site/home url and running string replacement for urls in the database, are there any additional steps needed to make this work?

ivankatic commented 2 years ago

Resolved: The plugin stores ABSOLUTE paths in the database, NOT URLs. Make sure that you replace both the domain URLs and the absolute paths (I recommend Better Search and Replace plugin).

My example ---------------------------------------------------------------- Original path: /home/OLD_USERNAME/public_html (... wp-content etc.) New path: /home/NEW_USERNAME/public_html/DOMAIN.COM/ (... wp-content etc.)

Brackets are just for reference, you only need the path before them. It can vary based on your server's folder structure.