Ошибка установки соединения с базой данных: причины возникновения и способы устранения

Update Your Site URL

Another possible problem could be the site URL for the database. This one is less likely to be the problem, but if nothing else works then it’s worth trying. In the host’s cPanel, go to Databases and select phpMyAdmin.

This opens a query editor allowing you to run SQL on your database. First, choose your database from the list. Next, select SQL. Then, add this line of SQL with your URL:

UPDATE wp_options SET option_value='examplesite.com' WHERE option_name='siteurl'

Finally, click Go. This will update your URL for the database. Once it’s complete, load your website again to see if the problem is solved.

Conclusion

The majority of “Error Establishing Database Connection” problems should have been solved with the three steps above. Still, there could be more elusive issues that continue to present themselves in this way. Here are some more articles that might be useful in tracking down and neutralizing the cause of this error:

  • A frequent source of high traffic (and thus poor performance and errors) is a brute-force attack common to WordPress installs. You can neutralize the attack by following How To Protect WordPress from XML-RPC Attacks.
  • You may save some server resources by implementing caching on your WordPress install. There are many simple caching plugins out there for WordPress. Our tutorial, How To Configure Redis Caching to Speed Up WordPress will show you how to configure a particularly performant Redis-backed cache.

Как исправить поврежденную БД в WordPress

Есть очень простой трюк, который позволит определить, стала ли поврежденная БД причиной ваших проблем:

Попытайтесь залогиться в вашей панели wp-admin.

Если сообщение об ошибке изменится на что-то вроде “One or more database tables are unavailable», то возможно БД нуждается в починке.

Это значит, что виновата поврежденная база данных, а не разорванная связь с БД. С другой стороны, если сообщение не изменится, то можете спокойно переходить к следующему шагу.

Чтоб исправить поврежденную базу данных, вам нужно сделать две вещи:

  • Добавьте кодовый сниппет в ваш wp-config.php, чтоб включить инструмент восстановления
  • Запустите инструмент восстановления

Прежде всего, используйте какую-либо FTP-программу или файловый менеджер cPanel, чтоб отредактировать ваш wp-config.php. Я думаю проще использовать файловый менеджер.

Найдите иконку файлового менеджера в cPanel, а затем выберете сайт, на котором появилась ошибка.

Затем просто кликните на wp-config.php и выберете опцию Edit (редактировать):

Вставьте эту строку кода в самый низ:

Затем вбейте в адресную строку это:

Ваш домен.com/wp-admin/maint/repair.php

Кликните на кнопку Repair Database, после чего WordPress вернет ваш сайт к его нормальному состоянию.

После запуска процесса восстановления, вам нужно будет убрать ранее добавленный код из вашего wp-config.php, так как эта функция не должна быть включена все время.

Step 3 — Repairing the WordPress Database

Sometimes, due to a failed upgrade, a database crash, or a faulty plugin, your WordPress database can become corrupted. This problem can present itself as a database connection error, so if your problem wasn’t the MySQL server or the configuration file, try repairing your database.

WordPress provides a built-in utility to repair the database. It is disabled by default, because it has no access controls and could be a security issue. We will enable the feature, run the repairs, and then disable it.

Open up the file again:

On any blank line, paste in the following:

wp-config.php

This defines a variable that WordPress looks for when determining if it should enable the repair feature.

Save and close the file. Switch over to your browser and load the following address, being sure to substitute your site’s domain or IP address for the highlighted portion:

A database repair page will load:

Press the Repair Database button, and you’ll be taken to a results page where you can see the checks and repairs happening in real-time:

Once the process finishes, be sure to open up the file again, and remove the line we just pasted in.

Did you notice any repairs being made? Try your site again, and check whether the error is gone. If unrepairable issues were found, you might need to restore the database from a backup if you have one available. Please reference our tutorial How To Import and Export Databases in MySQL for details on how to do so.

If no issues were found with the database, then we’ve still not discovered the problem. It could be intermittent issues we’re just missing, or something more obscure. Lets wrap up with a few other possibilities to try.

Сайт все еще не работает? Пообщайтесь с хостинг провайдером

Еще одна потенциальная причина появления проблемы может заключаться в том, что ваш хостинг использует раздельные серверы для хранения баз данных. Если сервер базы данных падает, то ваш сайт все еще будет загружаться даже при отсутствии доступа к базе данных, вызывая появление данной ошибки.

Но более частая причина связана с тем, что у вас кончились ресурсы хостинга. В частности малый объем памяти может приводить к проблемам с базами данных. Особенно этому подвержены бюджетные хостинги.

Чтоб решить эту проблему, вы можете попытаться поговорить с вашим хостером и договориться об увеличении лимита памяти. В большинстве случаев это работает.

Вместо заключения

В большинстве случаев исправление описанных проблем должно снова привести ваш сайт в рабочее состояние, переподключив его к БД. Хотя всегда причинами проблем могут стать другие промахи типа опечаток в базе данных, установки плагина, который приводит к повреждению БД или хостинг-проблем.

Источник

Тоже будет полезно:

Перезапись базы из бэкапа на последнюю работоспособную версию

Если восстановление базы и проверка учетных данных решили проблему с появлением ошибки, вы можете продолжать работу над сайтом в нормальном режиме. В противном случае, возможно, ошибка возникает по причине поврежденной базы данных. Потребуется восстановить ее работоспособность из панели PHPMyAdmin, перезаписывая файлы из ранее сохраненного бэкапа.

Прежде чем приступить к процедуре восстановления, сделайте резервное копирование текущих файлов во избежание потери данных. Будьте аккуратны, выполняя действия в PHPMyAdmin, поскольку в этой панели вы напрямую работаете со служебными таблицами базы данных.

  1. Зайдите в PHPMyAdmin, используя логин и пароль, выданные хостинг-провайдером при регистрации.
  2. В левой панели показывается ваша база данных (1) с входящими в нее таблицами. В рабочей области выберите вкладку «Импорт» (2).
  3. Нажмите кнопку «Choose File» (3) и укажите расположение ранее сделанного бэкапа, из которого будет восстанавливаться база.
  4. Нажмите «ОК» (4), остальные данные, как правило, соответствуют стандартным настройкам WordPress и не требуют изменения.

What Is the Error Establishing a Database Connection Issue and What Causes It?

To better understand what the error establishing a database connection issue is, it’s essential to understand how WordPress works.

WordPress is a CMS (content management system) built using PHP, a programming language PHP, and MySQL, a database.

While all the functions on your WordPress site are created using PHP, all the data on your site, such as content, images, video, and media files, are stored in the MySQL database.

When a page request is made, PHP pulls the page content from the database and displays it in your browser. That will include all content, plugin information, images, videos, audio, and almost everything you see on the page

The next time you type your WordPress website URL in the address bar, you now know where the data is being pulled out from and how it all works!

So, when you see the dreaded ‘Error establishing a database connection’ message, you know that PHP can’t access your database for some reason and cannot show the page to the user.

Here are some common reasons why we encounter an error establishing a database connection in WordPress:

  • Incorrect login credentials: WordPress accesses your database with a specific login and password. If the credentials were changed or corrupted, WordPress will not be able to access the database and fetch anything from it.
  • Corrupted database: With so many elements within your WordPress site, such as themes, plugins, addition, and users, there are chances that the database can get corrupted.
  • Corrupted WordPress files: Like how the database gets corrupted, your core WordPress files can also get corrupted. This could result from a failed core WordPress update and an update failure in plugins and themes.
  • Database server down: In some cases, your website files are hosted on a machine that’s physically separate from your database. If the server running the database or the connection to it is down for whatever reason, you end up with an error.
  • Too much traffic: While this is an excellent problem to have, it could turn out to be a problem. If your web server is not up to the sudden spike in traffic, your database could become unresponsive.

Conclusion

Getting the “Error Establishing a Database Connection” error on your WordPress website can be frustrating. The website won’t load, causing a risk of losing traffic and customers.

The error occurs when your WordPress site fails to retrieve information from its database. It might be caused by different reasons, such as incorrect login credentials in the wp-config.php file, corrupted files, or server overload.

Fortunately, there are several simple ways to solve this error:

  1. Point your domain to the correct host – make sure your A record matches your web host’s IP address.
  2. Verify your login credentials – match the login credentials in your wp-config.php file with the ones in your MySQL Database.
  3. Repair database – by inserting the define(‘WP_ALLOW_REPAIR’, true); function into the wp-config.php file.
  4. Fix the corrupted files – deactivate corrupt themes or plugins via your WordPress dashboard or download the latest version of WordPress and re-upload your core files.
  5. Check your MySQL server – create a new file containing the mysqli_connect function to check if your database user has enough permissions.
  6. Create a new database – start over with a new MySQL database and import a backup.

We hope this article has helped you fix the WordPress “Error Establishing a Database Connection” issue on your website. Identify the possible cause of this error, follow the steps accordingly, and you won’t have to worry about this error anymore.

Плагин, который невозможно удалить

У некоторых плагинов есть скрытые файлы, которые могут стать настоящей головной болью, если вам захочется удалить одно из таких расширений. В связи с этим хорошая идея скачивать плагины (и если уж на то пошло и темы) только с тех сайтов, которым вы доверяете.

Почему иногда так сложно удалить плагин:

Имеются скрытые или вложенные файлы.

Решение проблемы:

  • Брать плагины только с проверенных ресурсов. Не хватайте расширения откуда угодно. Если вы хотите приобрести на совесть написанный плагин, воспользуйтесь ресурсами типа CodeCanyon или WPExplorer. Если вас интересуют бесплатные плагины, то загляните в репозиторий WordPress. Лучшее лечение – это профилактика, верно?
  • Удалите плагин с помощью протокола Secure Shell (SSH). Этот трюк сработает только, если у вас есть доступ к сайту по SSH. Вот, что нужно сделать. Авторизуйтесь в блоге с помощью протокола SSH и идите в “../wp-content/plugins/“. Используйте команды Is –aI для перемещения по папкам, и чтоб, наконец, удалить проблемный плагин, используйте команду rm (имя папки).

Penyebab error establishing a database connection

Sebelum kami membahas cara mengatasinya, tentunya kita perlu mengenali dulu apa saja penyebab munculnya pesan error establishing a database connection. Berikut adalah beberapa penyebab yang paling sering ditemukan saat seseorang menerima pesan ini:

Kredensial login database salah

Website WordPress Anda menggunakan informasi login terpisah untuk terhubung dengan MySQL Database.

Database rusak

Dengan banyaknya bagian yang terus berubah-ubah dengan tema, plugin, dan pengguna yang terus-menerus menghapus dan menginstalnya, terkadang database menjadi rusak. Ini bisa disebabkan oleh tabel yang hilang atau rusak secara individual, atau mungkin beberapa informasi tidak sengaja terhapus.

Ada file yang rusak dengan instalasi WordPress

Masalah ini juga bisa terjadi karena hackers.

Ada masalah dengan server database Anda

Ada beberapa hal yang sebenarnya adalah kesalahan dari webhosting, seperti overload database dari traffic yang diganggu atau server menjadi tidak responsif karena mendapat terlalu banyak permintaan. Masalah seperti ini biasa terjadi dengan website yang menggunakan shared hosts karena mereka menggunakan banyak resource bersamaan dengan pengguna lain di server yang sama.

Conclusion

Getting the “Error Establishing a Database Connection” error on your WordPress website can be frustrating. The website won’t load, causing a risk of losing traffic and customers.

The error occurs when your WordPress site fails to retrieve information from its database. It might be caused by different reasons, such as incorrect login credentials in the wp-config.php file, corrupted files, or server overload.

Fortunately, there are several simple ways to solve this error:

  1. Point your domain to the correct host – make sure your A record matches your web host’s IP address.
  2. Verify your login credentials – match the login credentials in your wp-config.php file with the ones in your MySQL Database.
  3. Repair database – by inserting the define(‘WP_ALLOW_REPAIR’, true); function into the wp-config.php file.
  4. Fix the corrupted files – deactivate corrupt themes or plugins via your WordPress dashboard or download the latest version of WordPress and re-upload your core files.
  5. Check your MySQL server – create a new file containing the mysqli_connect function to check if your database user has enough permissions.
  6. Create a new database – start over with a new MySQL database and import a backup.

We hope this article has helped you fix the WordPress “Error Establishing a Database Connection” issue on your website. Identify the possible cause of this error, follow the steps accordingly, and you won’t have to worry about this error anymore.

Как исправить неверные параметры доступа

Есть две потенциальные причины того, почему параметры доступа в вашем wp-config.php больше не работают:

  • Что-то указано неправильно, то есть неверно введены имя пользователя и /или пароль.
  • Пользователь базы данных не имеет доступа к базе данных с определенными привилегиями.

Я думаю, что самый простой решить эту проблему закачается в создании совершенно нового пользователя.

Чтоб сделать это, идем в базы данных MySQL в вашей cPanel:

Прокручиваем вниз и добавляем нового пользователя (Add a New User):

После этого прокрутите дальше и добавьте этого нового пользователя к вашей существующей базе данных WordPress, используя опцию Add a User to a Database:

На следующем экране, убедитесь в том, что все боксы привилегий выбраны (All Privileges):

Затем обновите ваш файл wp-config.php, внеся туда нового пользователя базы данных и его пароль. Вы можете сделать это с помощью все того же файлового менеджера

Сохранив ваш файл wp-config.php, вы можете убедиться в том, что теперь все параметры входа верны.

Always-On Error

If you’re getting the error everytime, it most likely means that you have to fix your MySQL or MariaDB connection details within your wp-config.php file. More specifically, the options you’ll need to triple-check are DB_NAME, DB_USER, DB_PASSWORD and DB_HOST:

PHP

// ** MySQL settings — You can get this info from your web host ** //
/** The name of the database for WordPress */
define( ‘DB_NAME’, ‘database_name_here’ );

/** MySQL database username */
define( ‘DB_USER’, ‘username_here’ );

/** MySQL database password */
define( ‘DB_PASSWORD’, ‘password_here’ );

/** MySQL hostname */
define( ‘DB_HOST’, ‘hostname:port’ );

1
2
3
4
5
6
7
8
9
10
11
12

// ** MySQL settings — You can get this info from your web host ** //
/** The name of the database for WordPress */

define(‘DB_NAME’,’database_name_here’);

 
/** MySQL database username */

define(‘DB_USER’,’username_here’);

 
/** MySQL database password */

define(‘DB_PASSWORD’,’password_here’);

 
/** MySQL hostname */

define(‘DB_HOST’,’hostname:port’);

The DB_HOST is the most common cause of such error, because sometimes it’s not reachable – or not properly mapped in your OS host file:

  • On Windows, it’s C:\WINDOWS\system32\drivers\etc\hosts
  • On Linux systems, it’s \etc\hosts

Also, be sure that the TCP port value – the one after the column – is correct: such value can be omitted if your MySQL or MariaDB database is open to the 3306 default TCP port, otherwise you need to specify it.

Apa itu error establishing a database connection?

Semua informasi yang tersedia di situs WordPress Anda, seperti post data, page data, meta information, plugin settings, login information, etc. disimpan di MySQL Database Anda. Beberapa data yang tidak tersimpan di database itu hanya konten media seperti gambar dan tema atau plugin Anda, serta core files seperti index.php, wp-login.php, dan sebagainya.

Ketika seseorang mengunjungi website Anda, PHP akan mengeksekusi kode di halaman dan meminta data dari database, yang kemudian akan disajikan kepada browser pengunjung.

Jika PHP tidak dapat meminta data dari database, Anda akan menerima pesan “Error establishing a database connection”. Seluruh halaman akan kosong karena tidak ada data yang didapatkan untuk ditunjukkan di layar browser. Bukan hanya mengganggu front end website Anda, hal ini juga bisa membuat Anda tidak dapat mengkases dashboard WordPress Anda.

Ketika seseorang mengunjungi website Anda dan mendapat pesan tersebut, ini akan mengeluarkan 500 HTTP status code di logs Anda. Kode status ini akan muncul ketika website Anda mengalami “internal server error”. Ini berarti ada sesuatu yang salah di server Anda dan resource yang diminta tidak dikirimkan oleh server. Jika semua bekerja dengan baik, website Anda akan mengeluarkan 200 HTTP status code, yang berarti semuanya baik-baik saja.

Baca Juga: Begini Cara Membuat Countdown Timer di WordPress

UPDATE 12.03.2015

Прошло 2 дня. Пытаюсь зайти в админку и снова та же ошибка! Ну ё-моё, всё-ж работало!!!(((

Полез в саппорт (в техподдержку) хостера. Там ничем не помогли, сказали писать письмо и ждать. Ответа ждал больше  суток. В итоге закрыл заявку и засел ковыряться.

Для начала снова переименовал уже имеющуюся папку plugins, а вместо нее создал пустую. Не помогло!

Затем, удалил папку с темой (дизайном, шаблоном). Ошибка исчезла!

Восстановил папку с темой из копии и стал проверять каждый файл. Нашел целых 3 не в UTF-8. Перекодировал, сохранил. Не помогло!

Полез в function.php темы. Вычистил его содержимое полностью. Помогло! Ошибка исчезла.

Но без функций на сайте не будут работать нужные опции. Вернул содержимое на место и вырезал нижнюю половину. Естественно так, чтобы не оказалось перерубленных пополам функций. Делать подобные вещи надо по FTP. Но у меня других вариантов и не было.

Итак, вырезал последние 5-6 функций. Помогло!

Стал их возвращать по одной. Странное дело, оказалось, что сами функции на ошибку не влияют.  Я возвращал их в разном порядке, и ошибка проявлялась то на одной, то совсем на другой.

В итоге, начал удалять лишние переносы строк и пустые пробелы. После очередного сохранения проверил и… ОШИБКА ИСЧЕЗЛА!

Сохранил, сделал резервную копию сайта и перекрестился.

Похоже, всё-таки что-то на хостинге с кодировкой. На другом работало без проблем. Впрочем, теперь уже не уверен, что ошибка не вылезет снова. Подождём.

What Does “Error Establishing a Database Connection” Mean?

First, let’s take a look at how WordPress works to display your website, and it’ll become clear why this error is so devastating.

The WordPress software is written using PHP and MySQL. Why two languages? Because all the information that makes up your website is stored in a MySQL database, and WordPress uses PHP to store and retrieve information from that database.

Generally, whenever a page is loaded on your website, it’s built on-the-fly. PHP code is used to access your MySQL database and retrieve every bit of information needed to create the page. There’s a PHP query to access the post title, another to grab the author name, another to retrieve the publication date, and so on.

Back to your error message: “Error establishing a database connection.” This means that for some reason the PHP code was unable to connect with your MySQL database to retrieve the information it needs to build that page.

That’s why this error is often all you see on an otherwise blank page. If you can’t connect to your database, there’s no way to know what to display; no information about your website is available.

Ошибка синтаксиса кода wordpress

Проведенный мною анализ показал, что не редко встречаются ошибки, допущенные людьми, которые используют сниппеты кода на своих WordPress-сайтах. Когда вы сталкиваетесь с этой ошибкой, то видите что-то вроде этого:

Parse error - syntax error, unexpected $end in /public_html/your_site/wp-content/themes/your-theme/functions.php on line 38

Не стоит впадать в уныние из-за этого, так как сразу понятно, где искать проблему.

Причина появления ошибок синтаксиса:

Как правило, ошибка синтаксиса появляется там, где потерялся или наоборот появился неожиданный символ. В большинстве случаев такое возникает, когда неопытный пользователь пытается редактировать код темы или плагина, но также подобная ошибка появляется, если вы установили новую тему или плагин, содержащий ошибку.

Как исправить ошибку синтаксиса:

  • Научиться правильно вклеивать сниппеты кода. Если вы новичок в WordPress, то вас ждет долгий, но веселый путь к освоению этой системы управления контентом. Спешить нет смысла, так что разбирайтесь во всем, не торопясь. Если вы столкнулись с этой ошибкой после вклейки сниппета, то вам нужно научиться вклеивать их в WordPress правильно или сделаете только хуже.
  • Исправить кусок неправильного кода. Если эта WordPress-ошибка возникла после обновления плагина или вклейки кода из сети, вы знаете, где искать поломку. Проблема заключается в том, что если ошибка не дает вам попасть на сайт и воспользоваться «Внешний вид -> Редактор (или Плагины -> Редактор)». Это, конечно же, пугает большинство новичков, но не стоит волноваться, так как всегда можно отредактировать файлы WordPress с помощью FTP или Файлового менеджера из вашей cPanel. Найдите поврежденный файл и исправьте код, удалив его или переписав.
  • Попробовать другую тему или плагин. Если ошибка появилась после активации новой темы или плагина, то вероятнее всего она вызвана темой или плагиной. Так что вы можете найти альтернативу вашему выбору или связаться с разработчиками, чтоб те решили проблему. В некоторых случаях у вас может не быть возможности авторизоваться в WordPress, и в таком случае можно удалить плагин или тему с помощью FTP.

Что означает ошибка Error Establishing a Database Connection?

Прежде чем перейти к путям решения проблемы, я думаю, что важно понять механизмы ее возникновения. Есть две основные составляющие WordPress:

Есть две основные составляющие WordPress:

  • Код HTML/PHP – это то, что контролирует внешний вид и функциональность вашего сайта. Ваша база данных– здесь хранится вся информация о ваших записях, страницах, настройках, пользователях и т. д.
  • Когда посетитель оказывается на вашем сайте, HTML/PHP составляющая вашего WordPress посылает запрос к вашей базе данных, чтоб получить контент для вклейки в фреймворк, созданный HTML/PHP (плагины кэширования вносят в этот процесс свою лепту, но не суть).

Чтоб WordPress мог успешно послать запрос к БД, ему надо установить связь с этой базой данных.

Без этой связи WordPress не может получить доступ к определенному контенту, который нужно доставить посетителям. Так что если WordPress не может установить эту связь с БД, которая указана в вашем файле wp-config.php, то возникает эта ошибка.

Как избежать этой ошибки в будущем

Хотя нет 100% защиты от ошибки установления соединения с базой данных Вордпресс, вы можете применять 2 рекомендации для сведения к минимуму вероятности отключения сайта:

  • Используйте хороший хостинг, который оптимизирован для работы с Вордпресс и который имеет хорошую техподдержку. Настроенный для работы с Вордпресс хостинг помогает избежать многих общих проблем с Вордпресс. Я пользуюсь хостингом Бегет.
  • Настройте бэкап. Установите хороший плагин, например, UpdraftPlus и настройте . Если что-то пойдет не так, у вас всегда будет копия для восстановления.
  1. База данных Вордпресс
  2. Очистка и оптимизация базы данных
  3. Как изменить префикс базы данных
  4. Безопасность Вордпресс. Подробное описание

Understanding the Error Establishing a Database Connection in WordPress

Before we dig too much into this particular error message, let’s have a brief lesson on how WordPress sites work. Nearly all website information — including post data, plugin settings, login credentials, and more — is stored and organized in a MySQL database.

When a visitor comes to your site, WordPress uses PHP to query the database and pull the correct information, which is then displayed as the complete page.

If, for whatever reason, WordPress can’t access your site’s database or it isn’t working properly, the result is an Error Establishing a Database Connection message.

This error prevents the entire page from loading. In fact, you won’t even be able to access the WordPress dashboard (your site’s back end).

If your site uses caching, visitors may still see stored copies of your pages. Therefore, if you catch the error early and resolve the problem before your site’s cache refreshes, you can avoid too many interruptions to your site and business.

Fortunately, as WordPress errors go, a database connection error is usually pretty simple to resolve. The most common cause, by far, is just a mismatch of login credentials for the database.

Как всё починить

В первую очередь я рекомендую проверить файл wp-config.php. Вы можете найти его в корневой папке вашего сайта. Открывайте его в любой текстовом редакторе, Brackets или Sublime, если вы разработчик и у вас есть эти программы.

Затем пролистайте файл и найдите следующую часть в коде:

12345678 /** Имя базы данных для WordPress */define( ‘DB_NAME’, ‘название_здесь’ );/** Имя пользователя MySQL */define( ‘DB_USER’, ‘имя_пользователя_здесь’ );/** Пароль к базе данных MySQL*/define( ‘DB_PASSWORD’, ‘пароль_здесь’ );/** Имя сервера MySQL */define( ‘DB_HOST’, ‘localhost’ );

Теперь убедитесь, что данные доступа совпадают с теми, что указаны хостинг-провайдером. Чтобы проверить это, зайдите в панель управления и зайдите в разделы FTP и MySQL. Затем проверьте, указаны ли те, что назначены у хостинг-провайдера, в вашем файле wp-confing.

И я напомню, что имя сервера должно быть указано корректно. Когда вы просто загружаете файл с тестового сервера на хостинг, вы должны поменять значение DB_HOST с “localhost” на тот, что установлен хостинг-провайдером (если они отличаются).

Если всё это в порядке, но ошибка никуда не исчезла, давайте посмотрим, что мы ещё можем сделать.

Я не знаю, знаете ли вы, но вы можете попросить WordPress починить ваш сайт за вас. Чтобы сделать это, нужно выполнить несколько простых шагов.

Снова зайдите в файл wp-config.php и добавьте такую строку:

1 define(‘WP_ALLOW_REPAIR’, true);

После того, как вы сохраните изменения, пройдите по адресу https://ваш-сайт.ru/wp-admin/maint/repair.php, там вы увидите сообщение от WordPress.

Здесь у вас два варианта: Восстановить базу данных или Восстановить и оптимизировать базу данных.

Лично я рекомендую воспользоваться вторым вариантом, это позволит глубже взглянуть на проблему и не просто исправить её, но и оптимизировать базу данных согласно их собственным инструкциям.

Рейтинг
( Пока оценок нет )
Editor
Editor/ автор статьи

Давно интересуюсь темой. Мне нравится писать о том, в чём разбираюсь.

Понравилась статья? Поделиться с друзьями:
Люкс-хост
Добавить комментарий

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: