• Resolved jilly123

    (@jilly123)


    Hi Everyone,

    I have set up a new WordPress site on localhost and transferred it to my HostPapa server. I still have work to do and things to test so I made a sub domain staging site and copied everything over.

    I set up a new database and changed my config file accordingly.

    THE PROBLEM IS:
    My WooCommerce store is downloads only, but the I do a stripe test payment everything goes ok until I click on the ‘downloadable product’, my page then gets redirected to my ‘main site’ (which is the same but without staging. in front) and I get a 403 error message which reads:

    403 ERROR WHEN TRYING DOWNLOAD FILE AFTER PURCHASE
    
    [Sun May 09 07:17:06.743165 2021] [access_compat:error] [pid 155126:tid 47867117438720] [client 42.62.233.253:54109] AH01797: client denied by server configuration: /home/jillt598/inspirationalartworkonline.com.au/wp-content/uploads/woocommerce_uploads/2021/03/1024-3-im-not-rude-pdf-files-pwpdgv.zip, referer: https://staging.inspirationalartworkonline.com.au/index.php/checkout/order-received/4988/?key=wc_order_fAPs3Np3FxbcG

    ALSO
    I am getting a 404 Error on the staging site when I click on the products so I’m guessing it’s all related
    The menu item pages load OK
    https://staging.inspirationalartworkonline.com.au/index.php/product-category/amusing/

    But when I click on any of the products
    https://staging.inspirationalartworkonline.com.au/index.php//product/a-day-of-work-1-printable-art/

    I get this message
    404 ERROR
    Page cannot be found
    The Page you requested is not be found. This could be spelling error in the url.

    This is my FIRST website so I am not very technical knowledgable and a bit nervous ‘messing around’ with code. I have some html/css knowledge.

    I have been trawling the forums and internet for solutions, I have:
    checked .htaccess file, deleted it and created another.
    disabled the plugins etc
    deleted all of the files in the staging site and replaced with files from main site

    I am sure it’s something to do with redirection and things not pointing to the correct path/files but wouldn’t have a clue how to address that

    AFTER PURCHASE BUT BEFORE CLICKING DOWNLOAD
    https://staging.inspirationalartworkonline.com.au/index.php/checkout/order-received/4999/?key=wc_order_XXXXXXXXXXXX

    AFTER CLICKING ON DOWNLOAD (not the staging site anymore)
    https://inspirationalartworkonline.com.au/wp-content/uploads/woocommerce_uploads/2021/03/A-series_be-bold-strong-brave-pdf-files-lces6y.zip

    Basically I’m stuffed!!

    Hopefully, the geniuses out there can help me out ??

    Kind Regards
    Jilly

    • This topic was modified 3 years, 10 months ago by Jan Dembowski. Reason: Moved to correct Fixing WordPress forum
    • This topic was modified 3 years, 10 months ago by James Huff.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @jilly123,

    You’re doing great! Thanks for sending over all of these details. It really does help out ??

    Try this. Go to the Products section of your admin and edit one of the downloadable products. Check the file URLs there to make sure they match the staging site. That way they’ll be pointing to the correct site. That’s what I would try first.

    If that doesn’t fix this, could you please send me a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, you can paste it here.

    Thanks!

    Thread Starter jilly123

    (@jilly123)

    Hi @3sonsdevelopment

    Thank you so much for your reply.

    As I said in my original post I’m not very technically minded, I was ‘messing around’ with my site last night and completely ‘buggered it up’ oops!.
    Here’s what happened:
    I installed Better Search Replace plugin and inserted the info as shown in this screenshot
    https://snipboard.io/3x1nWw.jpg
    Oh dear – I broke my staging site – this screenshot shows what happened
    https://snipboard.io/Xs9mfG.jpg
    It changed the URL to staging.staging.inspirationalartworkonline.com.au
    Clearly I didn’t do it correctly.
    After this I couldn’t get into into my WP admin area, so I deleted my staging sub domain and related database then made a new sub domain and database etc (same name as old one) and reinstalled the information using Duplicator plugin.

    I have no idea why or how but the staging site seems to be working now, so I must have done something wrong when I migrated with duplicator last time – who knows?? – clearly I don’t!

    If you have any suggestions as to what I might have done wrong (from my screenshots) when I used the Better Search Replace plugin, that would be helpful for future reference. If not that’s fine.

    Thank you once again for your help – it really is appreciated.

    Such a lot to learn – so little time! ??

    Regards
    Jilly`

    Hi @jilly123,

    First off, I’m glad to hear you were able to get the staging site up and running via the Duplicator plugin. Typically using a plugin that handles all of the moving parts is the best way to set up a staging site. It can be done manually, but it’s a bit more finicky.

    I was looking at the screenshots you sent over. I believe what happened is the “search for” string will also match the “replace with” text. So you can end up with staging.staging.inspirationalartworkonline.com.au which won’t work.

    I think that may be what went wrong here.

    If you do need anything else, let us know.

    Cheers!

    Thread Starter jilly123

    (@jilly123)

    Hi @3sonsdevelopment

    Thank you so much for your help, I really appreciate it.
    I think I may be on this forum quite a lot!!

    Regards
    Jilly

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress WooCommerce new site 403 error and page redirects’ is closed to new replies.