Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Can not login wp-admin?

chmod, chown issue for wordpress

         

elvang

1:14 pm on Apr 23, 2022 (gmt 0)

Top Contributors Of The Month



Hi,
As soon as i installed wordpress with apache virtual host, it said that "The password you entered for the username xxxxx is incorrect. Lost your password?"

Wordpress is installed and when i browse my domain i can see my content with default theme. But i am not able to login wp-admin with the password.
I checked all files and i also reseted my password for wordpress in terminal. But still it is saying the same thing. I pasted my permission below is there something wrong to login wp-admin? thank you.

drwxr-xr-x 5 elvang elvang 4096 Apr 22 18:01 .
drwxr-xr-x 3 root root 4096 Apr 6 21:58 ..
-rw------- 1 elvang elvang 7449 Apr 22 18:53 .bash_history
-rw-r--r-- 1 elvang elvang 220 Feb 25 2020 .bash_logout
-rw-r--r-- 1 elvang elvang 3771 Feb 25 2020 .bashrc
drwx------ 2 elvang elvang 4096 Apr 7 20:35 .cache
drwxrwxr-x 3 elvang elvang 4096 Apr 17 11:30 .local
-rw------- 1 elvang elvang 173 Apr 22 18:01 .mysql_history
-rw-r--r-- 1 elvang elvang 807 Feb 25 2020 .profile
drwx------ 2 elvang elvang 4096 Apr 9 11:14 .ssh
-rw-r--r-- 1 elvang elvang 0 Apr 6 23:07 .sudo_as_admin_successful



drwxr-xr-x 5 elvang elvang 4096 Apr 23 14:48 .
drwxr-xr-x 6 elvang elvang 4096 Apr 22 11:41 ..
-rw-r--r-- 1 elvang elvang 523 Apr 22 13:25 .htaccess
-rw-r--r-- 1 elvang elvang 405 Feb 6 2020 index.php
-rw-r--r-- 1 elvang elvang 19915 Jan 1 03:15 license.txt
-rw-r--r-- 1 elvang elvang 7437 Dec 28 20:38 readme.html
-rw-r--r-- 1 elvang elvang 7165 Jan 21 2021 wp-activate.php
drwxr-xr-x 9 elvang elvang 4096 Apr 5 22:13 wp-admin
-rw-r--r-- 1 elvang elvang 351 Feb 6 2020 wp-blog-header.php
-rw-r--r-- 1 elvang elvang 2338 Nov 10 02:07 wp-comments-post.php
-rw-rw-rw- 1 elvang elvang 3405 Apr 23 14:48 wp-config.php
-rw-rw-rw- 1 elvang elvang 3283 Apr 23 14:01 wp-config.php.save
-rw-r--r-- 1 elvang elvang 3001 Dec 14 11:44 wp-config-sample.php
drwxr-xr-x 5 elvang elvang 4096 Apr 23 13:40 wp-content
-rw-r--r-- 1 elvang elvang 3939 Aug 3 2021 wp-cron.php
drwxr-xr-x 26 elvang elvang 12288 Apr 5 22:13 wp-includes
-rw-r--r-- 1 elvang elvang 2496 Feb 6 2020 wp-links-opml.php
-rw-r--r-- 1 elvang elvang 3900 May 15 2021 wp-load.php
-rw-r--r-- 1 elvang elvang 47916 Jan 4 11:30 wp-login.php
-rw-r--r-- 1 elvang elvang 8582 Sep 23 2021 wp-mail.php
-rw-r--r-- 1 elvang elvang 23025 Nov 30 20:32 wp-settings.php
-rw-r--r-- 1 elvang elvang 31959 Oct 25 03:23 wp-signup.php
-rw-r--r-- 1 elvang elvang 4747 Oct 9 2020 wp-trackback.php
-rw-r--r-- 1 elvang elvang 3236 Jun 8 2020 xmlrpc.php

not2easy

2:09 pm on Apr 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i also reseted my password for WordPress in terminal.
WordPress uses its internal settings. You can't change it in Terminal without also editing the configuration files that were created using the password you set up during the install. WP creates those files and since you can view the content, it appears that WordPress is using the original configuration settings (or nothing would be seen).

The main settings for the database that WordPress uses is your wp-config.php file and that file should not be writable as it appears it is in your list. This means that others may edit that file. You do not want to have that file with permissions set to be publicly readable/writable, it is a major security risk.

not2easy

2:20 pm on Apr 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You can learn more about the proper settings for various WP files and directories at the WordPress documentation site: [wordpress.org...] Their instructions explain what and how and why.

elvang

5:20 pm on Apr 23, 2022 (gmt 0)

Top Contributors Of The Month



Thank you for your warning not2easy I was also thinking to hardening wordpress but first i want to solve my login problem. In wp-config.php file i could only see the my database passwrd and user. I couldnt see the username or password for wordpress admin

not2easy

5:57 pm on Apr 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You were supposed to keep a record of that when you installed WP. Did you use a software program to run the install WP package? Something like Softalicious? In that process you submit the names and passwords for your WP.

IF you unzipped the package on your server then in your first visit to https://example.com/wp-admin/install.php you should have set up the password and users at that time. Because these settings are assigned internally, you should only make changes from within the WP interface.

There are instructions at the WP support docs if you want to do a manual install. I have only done a manual install for a local copy. That was like 20 years ago, I do not recall the process offhand but the steps are available at the Wordpress support site. The steps are listed at https://wordpress.org/support/article/how-to-install-wordpress/#detailed-instructions

You do not need to be in the process of hardening your installation to visit that link and find out the proper file permissions for using WordPress. Better to start it secure than wait until you're all done to keep it secure. I hope you have changed the file permissions for wp-config.php. If your server is local and the site is not 'online' it is not as risky, but still available to anyone on your network.

If you would like to see a list of possible reasons or causes for login problems and how to fix them - that information is also at the WP support site: https://wordpress.org/support/article/login-trouble/

elvang

6:33 pm on Apr 23, 2022 (gmt 0)

Top Contributors Of The Month



Ok i think i didnt take down that password properly. I decided to uninstall wordpress and install it again. thank you