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.

Media URL slugs without uploads folder path

if you change permalink to post name in setting and attach the testimony.pdf in your post, you will get http://example.com/your_post/testimony.pdf, to get url of the textimony u can get with this code <?php $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => ‘any’, ‘post_parent’ => $post->ID, ‘exclude’ => get_post_thumbnail_id(), ); $attachments = get_posts( … Read more

File upload in WordPress

May I know what plugin you are using for Uploading the File? If you are using the current version of php & cPanel, And have your WordPress to the latest version, I recommend you using the CALDERA FORMS. Here is the Link: https://wordpress.org/plugins/caldera-forms/ So next time you create for example a Job Application form with … Read more

How to move UPLOADS folder in sub-domain which hosted in another server

Warning! Nothing of the proposed below was tested. add_filter(‘upload_dir’, ‘update_attachment_url’); function update_attachment_url($data) { $data[‘url’] = str_replace(‘http://main-domain/’, ‘http://sub-domain.com’, $data[‘url’]); $data[‘baseurl’] = str_replace(‘http://main-domain/’, ‘http://sub-domain.com’, $data[‘baseurl’]); return $data; } Code source. Also you can try to change the values of upload_path and upload_url_path found in the wp_options MySQL table. Remember to run Search Replace DB to change all … Read more