Wordpress on HTTPS - wordpress

I've recently moved my website over to https:// and have re-installed WordPress to this new platform.
The SSL certificates are installed correctly in the appropriate directories. The certificate installation has been completed by my web hosting supplier. The wordpress installation is in a sub directory of the root https://www.mysite.co.uk/blog/. So far so good.
The normal website pages (which are external to WordPress) all function as required and normally merge posts from the blog, which appear in the page footer and in sidebars. These are currently suspended pending resolution of the WordPress issue.
The issue that I'm experiencing is simply that I cannot log in to WordPress. The admin log in panel at https://www.mysite.co.uk/blog/wp-login.php is displayed, however, when entering the correct username and password combination the wp-login.php simply goes through a loop but doesn't allow me to login irrespective of password and username combination.
Here's what I've tried:
I've changed the appropriate lines in wp-config.php to force an SSL login:
After WP_DEBUG in wp-config.php I added the following lines:
define( 'FORCE_SSL_LOGIN', true );
define( 'FORCE_SSL_ADMIN', true );
But with no result. Does anyone know what the potential issue might be?

Please try this code in wp-config.php
define('WP_HOME','https://www.mysite.co.uk/blog/');
define('WP_SITEURL','https://www.mysite.co.uk/blog/');

Related

ERR_TOO_MANY_REDIRECTS error in wordpress wp-admin login

I am using WordPress 4.9.2 and have followed all the steps for installation.
Now, once the installation finished I tried to login using entered credentials.
But its redirecting me to same wp-login.php page again and again.
I tried 'Lost your password?' option but haven't received any email yet.
Also, since my website uses SSL, I entered 'siteurl' and 'home' values with 'https://example.com/blog' but it doesn't even load wp-login.php then and as soon as I change it to 'http://example.com/blog' it loads the login page but after submission get redirected to same page.
Below are the few things I tried to get it resolved.
added below code in wp-config.php
define('FORCE_SSL_ADMIN', true);
disabled all plugins by renaming plugin folder
removed .htaccess file
restored default .htaccess file
added below code in wp-config.php
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
changed wp-login.php permission to 644
After every change , have cleared cache, cookies and checked again but no success.
If "your" SSL cert is provided by say an intermediate e.g. a CDN: Then the intermediary might be passing a "non-standard" 'HTTP_X_FORWARDED_PROTO' value e.g. uppercase "HTTPS" .
Alter your wp-config check of 'HTTP_X_FORWARDED_PROTO' to cater for these possibilities e.g.
if (stripos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
first of all, try to find the bug comes from.
1. take backup of DB & then drop all tables.
2. re-install WordPress by remaining all files as it is.
--> if still shows the same issue then the problem comes from file structure.
&
if it works correctly then the issue comes from DB for URL mismatch.
Give your feedback about issue tracing process, so I can suggest you an accurate solution.
similary i tried all the solutions like :
clearing browser cache
editting .htaccess and adding below lines
define ('WP_SITEURL', 'https://example.com');
define ('WP_HOME', 'https://example.com');
renaming plugins
but none worked for me.
check your SSL if you are using cloudflare.
i was having problem accessing the dashboard by ftp filezilla , so i used my hosting providers cpanel.
fianlly , by putting the below code in wp-config.php worked for me.
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on'; ``
I hope it helps, thank you.

Login fails in first attempt each time in wordpress

I have wordpress ecommerce website. When i am trying to login to any account first time whether it is customer account or admin account it shown invalid address: your email address. But when i try to login with same credentials for second time it is logged in successfully. So basically it fails for the first time everytime but gets success in the second time. How can i solve this issue ?
-Clear Cookies to Resolve Login Issues
WordPress uses cookies for login authentication, so the first step in troubleshooting WordPress login issues is the simplest one. Clear your browser cookies and cache. Also make sure that your browser has cookies enabled. After doing that restart your browser and then try to login. This should fix the issue for most folks.
Clearing cookies and cache in Google Chrome
-Deactivate All Plugins
Sometimes WordPress plugins can cause this issue specially if there is a conflict between two plugins. To deactivate all your WordPress plugins, connect to your web hosting using an FTP client. Rename /wp-content/plugins/ directory to plugins_backup. This will deactivate all WordPress plugins installed on your website. We also have a detailed tutorial on how to deactivate all WordPress plugins when unable to access WP-Admin. Once you have deactivated all plugins, try to logging in to your WordPress site. If you succeed, then this means that one of your plugins was causing the issue.
-Delete .htaccess File
Sometimes .htaccess file can get corrupted which can result in internal server errors or login page refreshing error. Simply access your website through FTP. Backup the .htaccess file in your computer and then delete it from your website’s root directory. You may want to delete .htaccess file in wp-admin directory as well if it exist. Try logging in again. If you succeed, then this means that your .htaccess file were stopping you from logging into WordPress. Once you are logged in, simply go to Settings » Permalinks and click Save. This will generate a new .htaccess file.
Not a 100% sure youre issue is listed but have you tried this ?
REF: http://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-login-page-refreshing-and-redirecting-issue/

Chrome pop up instead of login page after wordpress installation

So I installed wordpress (in a subfolder if it matters). After the installation I want to log in to my admin page (by going to /wp-login.php).
Instead of the login page, as I would expect it, I get the Chrome login pop-up. The login data with which I installed Wordpress does not work.
As you correctly surmised, this is not the Wordpress login screen.
This login is popping up because password protection is set up on the folder that you installed Wordpress in.
It depends on your server setup, but most likely this is being controlled from a file on your server called .htaccess. You will probably find it inside the subfolder you installed in, or possibly in the root folder of the site.
If you open that file and look for lines similar to the following, removing them will remove the password protection, and let you log in to Wordpress as usual.
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /path/to/.htpasswd
Require valid-user
Although - you might want to find out who added it there and why they added it, before removing it!
add below code in .htaccess file
Satisfy Any
I inquired the server admin and he suggested that I use wpadmin as an username and password. It worked. After I did that I got the normal Wordpress user page. The password is set by the admin to prevent brute-force attacks. If one has the same problem, just ask your admin for password (mine was wpadmin). #Tim Malone

Cannot log into wordpress site

Just recently discovered that neither my client or I can login to our Wordpress website. Here are the details:
Plugins: Contact Form 7, Envira Gallery Lite, Fusion Core (part of avada theme), Updraft Plus, Wordpress SEO, WP Retina 2x, WP Updates Notifier, Login Security Solution, Sucuri Scanner
Initially, the login page was requesting a password reset which is typical if too many false attempts have been made from a single user (part of Login Security Solution) plugin.
We tried to reset via the link in the email sent by wordpress. The new password generated is "invalid" when we try to login after the reset.
I FTP-ed in and changed functions.php to force a password reset. When I login with the new password, the login screen appears to be accepting the password, but rather than loading the dashboard, it loads the login screen again. Our Sucuri plugin emails an alert that the login was successful (which of course, it was not).
Next, I changed the name of all the plugin folders to make sure it wasn't a plugin causing the trouble. Same result.
Then, I looked at my htaccess file. It was overwritten with:
Files *.php deny from all /Files
I restore the htaccess file to it's original code. Still same login behavior.
I look through the rest of the site for other htaccess files. I change the names of htaccess files in the following places in order to disable them:
wp-content
wp-content/uploads
wp-content/uploads/sucuri
wp-includes
Still same login behavior.
Not sure what to try next. Not sure what triggered the problem. I was able to login on 12/22. My odd htaccess file had a modification date of 12/7. Client tried to login on 1/3 and was unable.
Any help would be greatly appreciated!!

Wordpress wp-login undefined redirect

After moving a wordpress installation from a remote server back to my localhost I ran into a problem I cannot seem to fix.
downloaded all files and the database
changed url's in the options db table
changed the .htaccess to run in the right directory
For some reason, when I now go to the WP admin directory and I try to login, after I press the login button it redirects to /wp-login.phpundefined/. Note the undefined behind the wp-login.php. It, of course gives a 404 page. I'm also not logged in, when I go to the WP admin again I still need to login. The code of the login has the right form action, so it happens somewhere in the process of the login script.
Anybody any idea what might cause this? Cheers!
Edit your wp-config.php to force the domain your WP installation is on.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
If that doesn't work, use the Fine and Replace tool that will replace all instances of your site's URL from your old database to your new site URL.
i.e. Find and replace.
http://localhost/
to
http://example.com/
wp-login.php can be used to (re-)set the URIs.
Find this line:
require( dirname(__FILE__) . '/wp-load.php' );
and insert the following lines below:
// FIXME: do comment/remove these hack lines (once the database is updated).
update_option('siteurl', 'http://your.domain.name/the/path' );
update_option('home', 'http://your.domain.name/the/path' );

Resources