woocommerce_my_account stopped working after moving to another hosting provider - wordpress

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.

Related

WordPress Site - Site not sending any data on user login and checkout

I'm just wondering if anyone might of been had the same experience as me before? I have just migrated a WordPress site (running on an older version of WordPress) to a new dedicated server.
My website loads up perfectly fine, however, when my users are logging in or trying to access the WooCommerce Checkout page, there browsers are returning the "Site did not send any data".
The strangest thing is, some people can log-in, others can't. I've advised my users to try deleting there browser cache and I've setup a tempoary log-in link (Incase the old log-in link my users was seeing was being cached from when my site operated on my previous server)
I've disabled all caching plugins, but in the Network tab, I'm still seeing a few elements being cached, I'm not too sure if this could be WP CLI cache which is perhaps operating in the background?
Ultimately, I'm just trying to get my head around how to solve th "Website did not send any data" error - It's been around 4 days since the server migration completed and previously, users had no trouble at all logging in and navigating the website.
Here's what I've tried so far:
Reset the htaccess file
Disabled caching plugins (Third-party plugins)
Installed Really Simple SSL to ensure all my website paths are being redirected to HTTPS
Changed my PHP handler to SuExec
Disabled server-side cache
Reset permalinks (Changed my permalink setting from Post Name to Plain, and vice versa)
But quite a few of my users are still reporting the same error, whilst other users can access and navigate my website perfectly fine.
Has anyone experienced a similar issue before?
Thank you!

WordPress site works while logged in to the site backend, breaks when not logged in

Our site was working properly for a month or so and all of a sudden it won't work unless you are logged into the site backend [/wp-admin]. You can see the issue here - https://hema-filler.com/.
While not logged in, it strips off the domain name from the CSS/Image/JavaScript requests and you can see that in the screenshot -
I'm only administering this site and not the developer. If you came across this kind of an issue before or if you know why this is happening, please post back.
This site is in Azure/Linux, on the latest WordPress version.
As far as I can see from the errors, your domain name is missing from the URL of the requests to the static content, which is why it is not loading properly. Please check your siteurl and homeurl inside your wp_options table in your database. If the issue still persists, then I would recommend checking with your hosting provider's support team. If they lack support, then I would recommend switching to managed WordPress hosting.

My wordpress website site URL is being changed again and again

Someone is changing my wordpress site URL to their ad spam URL. I changed it from php my admin and it was fixed, the hacker inserted a java script to every wordpress post and pages to redirect all posts and pages to their ad page, I deleted all of them. Then I installed wordfence security plugin, scanned the entire website, found some malicious codes and deleted everything. Then I changed my cpanel and wordpress password. I am using my own VPS so I also changed my root password, but still just after 12-24 hours, I can see that the wordpress site URL has been changed. I fix it and again it becomes changed.
I have mentioned what I have done, what else I can do to prevent this? Please any suggestion will be appreciated...
Your website has most probably been exploited, and the exploit is still active, as a backdoor for that Hacker..
I would check the access logs for your web requests, and especially POST requests!
which might show where is the hacker logging in via.. some Theme or Plugin that was exploited most probably.
If your web host does daily backups, it might even be worth reverting back to previous days to remove any changes... -- remember if you revert back any posts/changes from that day onwards will disappear.

Wordpress AMP pages not setting up throwing error 'Non-existent changeset UUID.'

I have setup the AMP plugin in WordPress but while going to see the AMP pages (Appearence->AMP), I saw an error "Non-existent changeset UUID".
Also there is message in console says,
"Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://test.com') does not match the recipient window's origin ('https://test.ve.staging.wpengine.com')."
Please help me to resolved it out.
I've recently taken over administration of a website that has historically been ... poorly managed, and upon trying to use WordPress' built in theme customizer, I was greeted with the same message: "Non-existent changeset UUID.", although I didn't get any related messages in the console.
Apparently my issue was caused by the fact that one of the people who set up the site to begin with had decided to put the public site at www.example.com and the WordPress admin pages at example.com/__wp.
If this is your issue, you basically have two options.
Make sure to log in at both domains.
This may be a little difficult since WordPress' login page is part of the admin portion of the site and thus only logs you in to the admin portion of the site, however this proved to be a good temporary solution for me as there was a plugin installed which added a login widget on the public portion of the site.
Change the WordPress Address to be on the same domain as your Site Address.
The Option appears under Settings > General, but in my case I couldn't change the WordPress Address setting there and had to go into the WordPress database in our company's MySQL server.
After dealing with the above issues, I discovered that this issue had also caused a bunch of resources to be incorrectly loaded from example.com that should have been loading from www.example.com, as well as a number of leftovers from the site's development that were causing some resources not to load because the database thought they were at localhost.
With the help of another Stack Overflow answer I found a Database Search and Replace Script in PHP by interconnect/it (also available on GitHub) which allowed me to repair the mess previous people had made of the website without making a new mess with incorrectly serialized data, or all of the work of manually, correctly serializing the data I needed to change.

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!

Resources