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

  • Reading time:6 mins read
  • Post last modified:November 24, 2020
  • Post author:
You are currently viewing [Solved] The requested URL /wp-login.php was not found on this server

The requested URL /wp-login.php was not found on this server for WordPress is one of the cumbersome error messages. Since its presence clearly means No access to the WordPress admin panel. Now, what?

wp-login.php not found

Due to incapability to enter the WordPress admin panel; the most users may feel option-less. In most cases the URL (path) might be

  • wrong
  • inaccessible
  • not exist.

Following are details about three situations with solution. Let’s go through it.

Situation A:  The URL might be wrong

In most cases, the WordPress installed in its own directory. When a user tries to change the default URL path of WordPress site from www.example.com/wp to www.example.com, he could be changed the site address instead of WordPress address.

Wordpress-path
URL structure when WordPress is installed in its own directory.

To overcome this situation, follow steps..

  • Login into cPanel > phyMyAdmin
  • Select appropriate database (other than information_schema)
  • Select wp_option table (the table prefix wp_ might be different)
  • Under the option_name field verify siteurl and home rows. Mostly siteurl missed the correct URL path.
correct-url-path-wp
phpMyAdmin view of wp-option

The above method is recommended. However, In case unable to access the database (phpMyAdmin) then you should follow below steps.

  • Add below code into functions.php immediately after the initial <?php line. Don’t forget to replace example.com with your own URL.
    update_option('siteurl','http://example.com/wp');
    update_option('home','http://example.com');
    
  • 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 example.com to your site URL.
    <?php
    update_option('siteurl','http://example.com/wp');
    update_option('home','http://example.com');
    ?>

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.

Situation B: The URL might be inaccessible

If your site still 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. More information on how to change file permission.

Another reason is .htaccess file. It can deny accessing the internal WordPress environment. To solve this issue, first download an existing .htaccess file. Generally located in root folder, 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

If your WP site is hosted on subdomain or you have activated multi-site, then kindly implement code from official WordPress guide on .htaccess file.

Don’t forget to re-set your desired permalink structure in WP admin panel ➔ Settings ➔ Permalinks. Because this change will be reset permalink structure to default one.

Situation C: The file wp-login.php does not exist

Accidently deletion or renaming of wp-login.php file can produce above-described errors. So, be sure it’s presence in installed location using cPanel or FileZilla.

My friend, that’s all I have researched for you to overcome the error belongs to wp-login.php. So, friends, please share your doubts and feedback via comments. You + I, we both can solve the doubt more efficiently.

This Post Has 21 Comments

  1. cd

    Thanks! Solved my problem immediately.

    Now to get the blasted thing to go to my WP site from the top-level domain.

    1. Lucky Bhumkar

      Glad to know.. Cheers..!

  2. Air Max

    Good. I should definitely pronounce, impressed with your website. I had no trouble navigating through all tabs as well as related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Nice task..

  3. Victor

    Solution 1 solved mine for me.
    Thanks

  4. Olusola

    Thanks. This solved my problem.

    Thanks again

  5. Jackson Cunha

    Muito Obrigado a opção 1 do BD resolveu!

  6. Olumide Kolawole

    Thanks for this info.

  7. dani

    thank you!!!! tried the first method and it fixed the problem. Finally an answer to my issue, i’ve been searching the internet the whole day.

  8. sonali

    I am not able to login through dashboard, facing below error.
    You must log in to access the admin area.

    Please help

  9. Lyda

    Merci.
    Situation B à résolu pour moi

  10. Aadi

    Hi, Lucky Bhumkar
    I am facing this issue, but in my case website developed perfectly on a subdomain. after downloading the files I tried to install and manage the website on localhost MAMP to finalize all the things. but when I installed it on localhost i start getting this error. change url in wp-option. change htaccess files but nothing works. Actually first I faced many issues importing database cause my database is very large files. somehow I manage to import but after that facing this issue and can not solve it. can you please help me to solve it?

    Thank you

  11. Devendra

    Thanks buddy.. Solution B worked for me as I was doing migration

Leave a Reply