Support » Fixing WordPress » Не могу зайти в админку лакального хостинга

  • Я заливал сайт на хостинг, потом поменял в wp.config имя базы данных, пользователя, пароль, чтоб база данных и сайт нашли друг друга. После того как я это сделал мне выпадает вот такая ошибка: Возникла ошибка при подключении к базе данных. Я теперь не могу зайти в админ панель локального хостинга на своем компьютере. Жду ваших советов, спасибо!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    Clearly the changes to wp-config.php are incorrect. Please verify the correct values with your host.

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    I have already completely removed the site from the hosting and the database, but I still cannot log in.

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    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?

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    The site is now in the htdoc folder.

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    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?

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    I use xampp. Transferring a site to hosting via a filezilla. Deleted without edits.

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    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/

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    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?

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    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.

    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    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' );
    Thread Starter fedoryakovlev7

    (@fedoryakovlev7)

    Please give help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.