Clearly the changes to wp-config.php are incorrect. Please verify the correct values with your host.
I have already completely removed the site from the hosting and the database, but I still cannot log in.
I don’t understand. If you removed the site from hosting, where is it? If it’s on your local machine, how are you doing local hosting?
The site is now in the htdoc folder.
That’s not what I mean. Do you have a mysql server? What OS? When you moved the site back from hosting to localhost, did you restore the wp-config.php to its “local” version?
I use xampp. Transferring a site to hosting via a filezilla. Deleted without edits.
SO is the problem with XAMPP or on your hosting? This is really unclear. What do you mean by “deleted without edits”?
I’m wondering if this would be better for you in Russian. You might ask at https://ru.wordpress.org/support/
I made a website on a local server using xampp. Uploaded the site to hosting via filezilla. In the same place I created a database and transferred the database as an archive and changed it to the database name, username and password wp-config.php. The error I mentioned above appears. Later I removed the site from the host and from the database. The error remains.
Later I removed the site from the host and from the database. The error remains.
Do you understand that by removing the site from the host and database, there’s nothing to log in to anymore?
Or are you trying to say that you get the error on localhost (xampp) also?
The files remained on the local server. Yes, I cannot log in with this link http://localhost/kharkovnews/wp-admin.php
There are more things:
A WordPress site has a setting which tells WordPress what URL the site has. Your site has moved to a different URL, so you need to change this. See https://wordpress.org/support/article/changing-the-site-url/
In your database there will be a lot of links, to include images and perhaps links to other pages, etc, that now include the previous URL, which means that images won’t show if those files aren’t reachable anymore.
There’s a plugin “Better search replace” that can help you fixing this. Before trying it out, make sure that you’re keeping an extra copy of your database, just in case.
That such an error. Please, help!
An error occurred while connecting to the database
This means that the username or password in your file is wp-config.phpincorrect, or you cannot connect to the database server localhost. It may also mean that your hosting provider’s database server is down.
Are you sure you have the correct username and password?
Are you sure you entered the correct server name?
Are you sure the database server is running?
If you are not sure what these terms mean, you can contact your hosting provider. You can also always visit WordPress Support Forums .
In config write this
define( 'DB_NAME', 'wplocal' );
/** MySQL database username */
define( 'DB_USER', 'root' );
/** MySQL database password */
define( 'DB_PASSWORD', 'root' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );