Auto delete attachments that are older than x days

Are you really sure you want to do this? What about all of the posts that these “old” attachments are used in? For attachments that are used for things like “featured image”, WP will take of that for you. However, for uses of an attachment in post_content, e.g. <img src=”https://wordpress.stackexchange.com/questions/258966/img_attachment_url” /> <a href=”pdf_attachment_url”>download PDF</a> you’ll … Read more

Upload Button in meta box not opening library

You mentioned that you’ve added the meta box for pages: I have created a custom template, added two metaboxes in Pages using a ‘Page_Fiche_Metier.php’ template. However, in prfx_image_enqueue(), the code only runs if the post type is post. Changing prfx_image_enqueue() so that it checks for the page post type will fix the issue. function prfx_image_enqueue() … Read more

Uploading website to Host

I use Search-Replace-DB from interconnectit for years now and had always good results with replacing urls. In case you have Yoast SEO plugin installed you might have to deactivate it when you rewrite the urls, otherwise I never had trouble using that scripts up to now. https://github.com/interconnectit/Search-Replace-DB