• Resolved jilly123

    (@jilly123)


    Hi Everyone,

    I am NEW to WordPress and am hoping there is someone out there that can help me.

    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 when 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/xxxxxx/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

    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 and am really struggling to find answers/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_3ETeR4kS5tnV1
    Screenshot
    https://snipboard.io/r3ACzq.jpg

    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
    Screenshot
    https://snipboard.io/gGoxr5.jpg

    Basically I’m stuffed!!

    If anyone could give me any tips/help to solve this problem, I would be very grateful.

    If I need to provide any further info please let me know.

    THANK YOU
    Regards
    Jilly

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Sunday Ukafia (a11n)

    (@sukafia)

    Hi @jilly123,

    It appears there are 2 URLs in your database, the staging site URL and the main site URL. If the issue is on your production site, you’d have to replace all instances of the staging site URL with that of the main site URL – You can do this using a plugin such as Better Search Replace.

    I hope this helps!

    Thread Starter jilly123

    (@jilly123)

    Hi @sukafia

    Thank you so much for your help, I will add the plugin and try that in the morning (bedtime here in Australia)!
    I will report back as soon as I can.

    Thanks again
    Regards
    Jilly

    Thread Starter jilly123

    (@jilly123)

    Hi @sukafia

    Thanks again for your advice, as I said in my original post I’m not very technically minded.
    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??

    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.

    Regards
    Jilly

    Plugin Support Sunday Ukafia (a11n)

    (@sukafia)

    Hi @jilly123,

    Thanks for the confirmation!

    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.

    The main domain and the staging site domain contain the root domain “inspirationalartworkonline.com.au”, so replacing the root domain with “staging.inspirationalartworkonline.com.au” just added “inspirationalartworkonline.com.au” in front of the previous staging URL (replaced the staging site root domain) – I hope that makes sense?

    The proper way would have been to specify the full URL https://inspirationalartworkonline.com.au – that way you’d have been replacing just the main domain URL.

    I’ll go ahead and mark this topic as resolved since you’ve confirmed the issue no longer exist.

    Cheers!

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.