The requested URL /wp-login.php was not found on this server

Scenario 1 : URL Issue

Follow the steps below.


Login into cPanel > phyMyAdmin
Select the appropriate database
Select wp_option table (the table prefix wp_ might be different)
Under the option_name field verify site URL and home rows. Mostly siteurl missed the correct URL path.



However, In case unable to access the database (phpMyAdmin) then you should follow the below steps.

Add below code into functions.php immediately after the initial <?php line. Don’t forget to replace with your own URL.

If you are using a child theme without functions.php file, then you should have to create a new one in the child theme folder. Add following code in functions.php with replacing to your site URL.

Now load login or admin page 2-3 times. It will help WordPress to execute these changes with a database. Once the website will up and running, remove above code snippet from the functions.php.

Scenario 2 : Incorrect Permission

If your site shows the error message The requested URL /wp-login.php was not found on this server, then probably a fault in file permission level. The default file permission level for wp-login.php is 644. Sometimes it is changed to 640 by security plugins.

Steps to correct permission.

Download the permission script

[[email protected] ~]# wget

[[email protected] ~]# chmod +x

We can run this for a specific cPanel username.

[[email protected] ~]# sh ./ -a  iserver

For running this script server-wide and attempt to fix any incorrect permissions, run the below command.

[[email protected] ~]# sh ./ -all

Scenario 3 : Htaccess issue

Another reason may be related to .htaccess file. It can deny accessing the internal WordPress environment. To solve this issue, first download an existing .htaccess file. Generally located in the root folder, the same place where wp-config.php also be there. Now, replace your current .htaccess with following code snippet


# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress