• Resolved Brad Dalton

    (@wordpresssites)


    I’m getting Invalid Download Link Go to shop after order completion for WooCommerce download links after migration from WPEngine to WordPress.com.

    I’ve tried?Force Downloads” , “X-Accel-Redirect/X-Sendfile and Redirect only but none allow downloads.

    X-Accel-Redirect/X-Sendfile?– Downloads are handled by the server (nginx/apache). This method requires the X-Accel-Redirect/X-Sendfile module to be installed and enabled on the server.

    Do i need to do this https://developer.woocommerce.com/docs/using-nginx-server-to-protect-your-upload-directory

    # Protect WooCommerce upload folder from being accessed directly.
    # You may want to change this config if you are using "X-Accel-Redirect/X-Sendfile" or "Force Downloads" method for downloadable products.
    # Place this config towards the end of "server" block in NGINX configuration.
    location ~* /wp-content/uploads/woocommerce_uploads/ {
    if ( $upstream_http_x_accel_redirect = "" ) {
    return 403;
    }
    internal;
    }

    Thanks for any guidance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Brad Dalton

    (@wordpresssites)

    Update. Not fixed but. Found a problem. When migrating from wpsites.net to wpsitesnet.wpcomstaging.com and then changing the Primary site address from staging to wpsites.net here wordpress.com/domains/manage/wpsites.net, the links to the download directories did not change from wpsitesnet.wpcomstaging.com to wpsites.net causing the invalid links.

    Any guidance on bulk changing these links would be appreciated. Maybe an SQL query or something else? Thank You.

    P.S Your migration team might be interested in this.

    Thread Starter Brad Dalton

    (@wordpresssites)

    Here’s another problem.

    When you migrated wpsites.net to staging and then to wpsites.net, downloads links like this became broken.

    /nas/content/live/wpsitesstg/wp-content/uploads/dlm_uploads/2024/08/2024-block-child.zip

    should be

    https://wpsites.net/wp-content/uploads/dlm_uploads/2024/09/2024-block-child.zip

    Thread Starter Brad Dalton

    (@wordpresssites)

    Resolved using Search and replace. Must have broken after the site got mapped to the wpcomstaging.com as it was on there for a few days and i published 13 posts/products.

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @wordpresssites,

    Glad to hear that you were able to resolve the issue.

    Should you have further inquiries, kindly?create a new topic here.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.