Import download attachment from woocommerce product

Here is the solution i’ve found : in wordpress-importer plugin function process_posts : // try to use _wp_attached file for upload folder placement to ensure the same location as the export site // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload() $postdata[‘upload_date’] = $post[‘post_date’]; if ( isset( $post[‘postmeta’] ) ) { … 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.

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)