Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Woocommerce Products Showing 404

I have a development system that I am building with nginx, mariadb and php-fpm.  The server is using woocommerce 3.6.5 for a shopping cart.  I imported a working database from my production server.  I can access the admin section, the products in the dashboard but when I go to the site and try to get the products I get a 404 error.

I have double-checked the permalinks, I have cleared wp-rocket cache, rebuilt the search index, restarted mariadb and nginx but nothing changes the 404.

/var/log/nginx/error.log:2019/08/12 20:37:55 [error] 24971#0: *121 open() "/data/web/theherbsplace.com/404.html" failed (2: No such file or directory), client: [my ip], server: www.findinghelp.me, request: "GET /product/golden_salve_p_343/ HTTP/1.1", host: "www.findinghelp.me", referrer: "https://www.findinghelp.me/"
/

Open in new window


The exact url works on https://www.theherbsplace.com/product/golden_salve_p_343/

This is the permalink for the product - https://gyazo.com/a101a215fe3278be4ce08ccecba55698

Please help me to get the products showing.
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Go into Settings > General, and click Save Changes. Sometimes WordPress seems to get confused after it has been moved/cloned to a new URL.
Avatar of sharingsunshine

ASKER

didn't work.  The only page on the site I can access is the home page index.php.  Everything else is showing a 404.
Do you have Wordfence installed on the site? If so, there may be changes to the .htaccess file that need to be removed/updated.
Does the Settings > General page have the correct site url?
When I visit https://www.findinghelp.me/ I'm seeing a php warning:
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /data/web/theherbsplace.com/wp-includes/functions.php on line 4773

Open in new window

The warning is referring to the live site, which says to me something's not been configured correctly in the dev site. The dev site should be completely independent of the live site.
Actually, I am on an nginx instance so .htaccess isn't involved so I am told.  Yes, the correct site url is in place.  The full path is just that the path name it has nothing to do with the production server.  Since that is a warning it has been there for over a year I am just trying to debug right now.

Are there any logs or a way to capture the error causing this issue?
For instance, where is the Maria log for Centos 7 AWS instance?
ASKER CERTIFIED SOLUTION
Avatar of sharingsunshine
sharingsunshine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial