Error - different homepage after login and after logout - wordpress

Yesterday I was migrating from my "Localhost" to my new Hosting after completing (somewhat) my website.
I was migrating using the "All in one Migrating WP" plugin, and after Restoring my backup everything seemed fine.
Then some users told me that they see another homepage. I went to the website and logout, then I saw that they are right.
Some pictures in order for you to understand what I get:
At Logon Homepage
At Logon
At Logout Homepage
At Logout
Static page is set in settings to my "Elementor", everything looks like my localhost but only after logon of users. What is weirder is that I deleted the "Theme" that the page (after logout) is using, but it is still shown.
I am using Linux (ubuntu 20.04, php8.1-fpm, nginx, redis, mariadb (mysql)) and tried to restart them all after the "All in one migration plugin" did his magic.
I just can't put my hand on this problem.
Thanks for everyone in advance.

Answer: If using "Webinoly" the first thing to do is importing using the migration plugin you use, and then execute sudo site <your_site_name> -cache=off and then same again pass the 'on' argument.
restart using systemctl the nginx service.

Related

WordPress - “You do not have sufficient permissions to access this page” in production but not locally with AWS and Bedrock

I have an installation of WordPress setup using Bedrock(https://roots.io/bedrock/) hosted on Amazon Web Services' Elastic Beanstalk. I am getting the following error when I try logging in with my admin user:
"You do not have sufficient permissions to access this page"
What's strange is that I only get this error in production. Locally everything works fine. The rest of the site also works fine in production.
I've been trying for quite a while, however none of the things I've tried seem to help. Below are some notes of what I've tried/noticed:
Did not change table prefix for database
Checked usermeta table - all the values are fine for wp_capabilities and wp_user_level
Tried creating a 'force-upgrade.php' script.
Can't access any admin pages by changing the URL (e.g wp-admin/themes.php)
The issue arose after the switch the Bedrock
Made sure the config files were identical in both environments
Any help would be much appreciated.
Check out this link for some more info https://discourse.roots.io/t/you-do-not-have-sufficient-permissions-to-access-this-page/3536/4
From the looks of it bedrock disables edits on production environments
This can be turned off by going to https://github.com/roots/bedrock/blob/master/config/environments/production.php#L14 and changing this line define('DISALLOW_FILE_MODS', true); to define('DISALLOW_FILE_MODS', false);

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: attempting to update plugins results in 503 error after several minutes

I'm using wp 3.4.2 on a hosting service. I can access the ftp server and make changes using a ftp client (ie I have the correct credentials). I inherited the website and I'm trying to update everything, but as a precaution I started with the plugins.
The problem
When I try to update a plugin using the admin dashboard, after clicking "update now", the page keeps loading for several (about/at least 5) minutes. Afterwards I get a Error 503 Service Unavailable error. FTP settings are hardcoded in wp-config.php. This happens with all the plugins.
I solved it already, answer below.
In case anyone happens to stumble upon this problem, in wp-config.php the ftp host should be set to localhost instead of ftp://yourdomain.com.
Another solution i have found on my webhost was that the database user the wordpress installation used lacked the permission to refrence and to delete. Solved by giving the DB user FULL access.

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

Wordpress site not logging in

I created a site locally on my machine everything is working fine, I uploaded it to my server a couple of weeks ago for testing/client review.
Everything looked good so the site was launch. The sites been up and running fine for about a month, today I tried to login to the backend but I have'nt been able to.
I'm able to access the login page fine. I insert my username and password and the page does nothing, just refreshes the page and clears the login form. I've tried resetting my admin password using the login form and it just keeps telling my to input a username or email.
I've downloaded the entire site and database installed it locally and it runs great no issues. I've up graded the local version to 3.1.3 it was still working fine so I replaced the live version with the new files, and still no luck.
Any suggestions?
I'm still not 100% sure what caused the problem, I'm guessing something in the core wordpress install was corrupted.
I ended up installing a fresh version of wordpress, exporting and then importing my database into a new database, and uploading the media, theme, and plugins separately which seemed to do the trick.
When you have a duplicate of a site on localhost or dev server and they have the same security keys it can cause a cookie collision.
Make a change to all of the security keys in the wp-config.php file and it will reset all sessions and cookies.
Same issue for me and i already mentioned here what worked for me.
Wordpress 3.8 gives me "You must enable cookies to use WordPress." at login

Resources