403 error after adding product to cart - wordpress

I am creating e-commerce site using woocommerce plugin. Everything works well until adding a product to cart on my site. Then, if I go to the cart page - everything breaks down. Only thing that shows up is
Error occurred: 403 - forbidden
Apache Server at: s1062803-15589.home-whs.pl
Now I have no access to the site at all, even to wp-admin site. What can I do?

Solution - it looks like the problem comes from a .htaccess file on a server. It was blocking some parts of the site. I contacted my hosting operator and they configured the file. Now my site works very well.

sometimes firewall and something like mod_security make this problem. if you are host administrator try to disable them.

Related

Wordpress 404 error on domain.com/wp-admin

My WordPress site having issue so not able to reach out to the domain.com/wp-admin, it's redirect to 404 error. I have been tried out for delete ".htaccess" file however it's not working.Cache and cookies of the browser also have been clear out. Would need some advise how can I reach out to my domain.com/wp-admin.
I have been tried for using domain.com/wp-admin.php. Disable plugin however it's also not working from my end to redirect on my side
Usually, a 404 error on /wp-admin/ is caused due to missing .htaccess in your website's root directory, so first thing first, make sure that you have a valid WordPress .htaccess ( https://wordpress.org/support/article/htaccess/ ).
After that, make sure that you do not have a plugin for a custom admin login as it might also cause this behavior. If the issue still persists after that, try accessing the admin login page at: yourdomain.com/wp-login.php
If none of the above work, you should ask your hosting provider for further help.

wp-admin/admin-ajax.php 404 when adding media to article

I'm struggling with this problem since a couple of days, I tried everything I found around but nothing seems to fix the problem.
So, I created this wordpress website on my local machine and deployed it on a test server, untill there no problem, everything works as expected. Then I deployed the website to the prod server and everything works fine except that when I try to add an image to an article, the image isn't displayed and I get a 404 error on /wp-admin/admin-ajax.php.
Unfortunately, the prod server is one of those crappy web hosting with cpanel that doesn't give you access to php error logs.
Does someone know how to fix this problem?
Thank you in advance.
Delete .htaccess
Login to your admin panel. Go to:
Dashboard -> Settings -> Permalinks -> Save. (just automatically recreates your .htaccess again). That should do the trick.
If the problem persists. Try disabling plugins. Enable plugins 1 by 1 until the problem occurs again. That will narrow down the faulty plugin.
It was ModSecurity for me as well
If you don't want to disable the ModSec module entirely, you can whitelist rules for certain pages/actions using the ConfigServer ModSec Control module.
In this case I have added a New DirectoryMatch rule for
/wp-admin/admin-ajax.php
The rules I have whitelisted are
941160
949110
980130
You can tell what rules you need to whitelist by using ModSecurity Tools and looking at recent hits and the corresponding Rule ID
I was getting the admin-ajax 404 due to the ModSecurity.
Try to disable the mod security: Cpanel > Security > ModSecurity.
I finally found the problem!
Apparently, the mod_security module of apache was blocking the page. I disabled it and everything works correctly now.

woocommerce_my_account stopped working after moving to another hosting provider

I recently moved my site built in Word Press to another hosting provider and I found the shortcode [woocommerce_my_account] is not working anymore.
Previously, I had a page called account login where I had the shortcode [woocommerce_my_account]. In the settings I set the landing page to be the same page (account login). so, after an user logged in, it was redirected to the same page showing his/her details.
However, in the new hosting provider this is no longer working. After I put the login information and attempt to login it is taking me to wp-login.php page and ask me to enter my login details again.
The URL path that I see in the browser after attempting to login is similar to this <site_name_url>/wp-login.php?redirect_to=http://<site_name_url>/account-login/
Anybody has got to the bottom of this issue? Thank you.
Try adding this to your wp-config.php:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Make sure you change http://example.com with your own domaine. You can also try to search and replace your domaine in the database if it has changed.
You can also try to clear browser cache and cookies. I had an issue like this before, launched a private navigation and it was working fine.
Try setting define(‘WP_DEBUG’, true);, you may see something going on.
Sometimes, php version makes a difference, try to set the same php version on you new host (google the name of your hosting provider + change php version).
When you move sites/restore databases you often need to save the permalinks again.
go to /wp-admin/options-permalink.php and click "save". This will setup your .htaccess file with the correct information for redirects.
Finally, after all of these days searching and trying different things, the answer for this issue in my case was not related with the Word Press installation itself but, with some software installed on the server called varnish, apparently used to cache the site and improve its performance.
After having a support chat with the hosting provider, they mentioned that varnish is breaking the woocommerce plugin.
At this point, I am not sure if varnish is not compatible with woocommerce or the settings applied on the server using this software make woocommerce not to work properly.

Wordpress clone on Dreamhost

So I created a new subdomain on Dreamhost. One-click installed Wordpress. Fresh Copied the olddomain.com to newdomain.com exported all the tables with the drop attribute to the new wordpress database via phpmyadmin. Then followed this post to update the urls.
The site doesn't load, giving me this error message:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
I would make sure to check the 'www' rules in Fully Hosted (from the web panel: Manage Domains > Web Hosting > Edit), compared with your site URL settings in the WordPress dashboard. Make sure those aren't conflicting first.
If you need further assistance, just let me know the domain name and I can take a look. Please also feel free to start a LiveChat from the panel or submit a ticket; our support team is here to help 24/7!
Thanks!
Ellice S
DreamHost Staff
I finally ended up creating an empty site and then using the WP Duplicator plugin. Worked like a charm!

Wordpress shows forbidden from another server

I have a wordpress installation on an IIS7 Windows Server 2008 shared hosting service.
It didn't have any problems till few days ago.
Now, when I edit a post or submit a comment while I'm logged in, this page appears:
for example, if I send a comment while I'm logged in as an admin on my site, comment will send, but I see that page instead of comment sent page...
As you see, it shows an ((Apache CentOS , nginx)) server, but my server is a windows (IIS) server!!
is my site hacked? or ...? What's going wrong with my website?!?
The problem was from PubSubHubbub plugin. (I think from invalid sites on its settings)
I deactivated it and everything is fine now.
Just a note, Wordpress runs best on Apache, with PHP5 & MySQL. I can't see the error in your screenshot very well, but it could be due because you tried to use the non-default permalink structure on IIS.
Guessing from the screenshot it looks like you may have a bad update service listed which is messing with IIS. You can the update services that you are currently sending to under Settings > Writing in your admin area. You should try temporarily removing all of the update services and see if that resolves the issue.
Here's a more through explanation:
http://codex.wordpress.org/Update_Services

Resources