WP in subfolder hidden by htaccess, but media links show the subfolder

One option is to explicitly move the wp-content folder one level up so it resides at /public_html/wp-content by defining WP_CONTENT_DIR in wp-config.php. For this I’d recommend something more like the second method described in Giving WordPress Its Own Directory. Editing wp-config.php has an example for the WP_CONTENT_DIR change. The resulting directory structure (relative to public_html … Read more

Uploaded image with non-english characters is named incorrectly in upload folder

This is well know issue but for some reason it is not resolved since 2013 https://core.trac.wordpress.org/ticket/22363 You can always sanitized filename by yourself using sanitize_file_name filter. /** * Sanitize filename to not brake links with UTF-8 characters * * WordPress allow to upload files with names containing UTF-8 characters. Some * browsers do not handle … Read more

Populate a custom attachment metadata field with data from the image’s EXIF data?

You can hook into the add_attachment and edit_attachment action hooks and use PHP’s exif_read_data() to add the EXIF data to your attachment’s metadata: <?php add_action( ‘add_attachment’, ‘wpse302908_add_exif’ ); add_action( ‘edit_attachment’, ‘wpse302908_add_exif’ ); /** * Inserts metadata from an image’s EXIF data. * * @param int $post_id The attachment’s post ID. * @return void */ function … Read more