Moving wp-content folder to public_html

I was able to fix this problem by using this code instead of the one above: define(‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’); define(‘WP_CONTENT_URL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/wp-content’);

Hide obj path in source code

You could use admin-ajax.php to create a simple file proxy: add_action(‘wp_ajax_proxy_for_object1’, ‘proxy_for_object1’); add_action(‘wp_ajax_no_priv_proxy_for_object1’, ‘proxy_for_object1’); function proxy_for_object1() { $mimetype=””; // set to matching file MIME type header(“Content-type: “.$mimetype.”;”); echo file_get_contents(‘/wp-content/uploads/xx/thenameofmyfile.ext’); exit; } Then set the object resource URL to admin-ajax.php?action=proxy_for_object1 It will of course be fully accessible through the provided URL anyway, so this is really … Read more

File Upload Management

You can start yout work with upload_dir filtering. However, I wouldn’t recommend it (change this functionality). You will need to track few types of uploads and then track whoever is the parent of the upload. It’s more complicated, then joyful task.

Add more field on WordPress media upload

not without creating your own custom form. There are 2 ways to achieve this, uploading attachments in the post editor, In your post edit page you can create a custom metabox which will allow you to enter custom fields for your posts. When you save your post, you can hook into the backend saving process … Read more

Media files not loading

WordPress 4.9.5 does not have the field to specify the upload path. You can do it by editing the wp-config.php: define( ‘UPLOADS’, ‘wp-content/media’ ); // relative to ABSPATH See Moving uploads folder.