Проблема с переносом сайта на локальный хостинг
-
Хотел перенести сайта с хостинга на локальный, проблема вот в чем возникла когда перенес в корневую папку, настроил, прописал БД и пароль к нее в файле wp-config.php. Когда пробую зайти на сайт через браузер, появляется уведомление ОШИБКА УСТАНОВКИ СОЕДИНЕНИЯ С БД. Помогите решить проблему,
Просмотр 8 ответов — с 1 по 8 (всего 8)
-
Перепроверьте все координаты в
wp-config.php, начиная с адреса сервера БД.Что используется для локального хостинга? Денвер, XAMPP, отдельные установки?
денвер
что здесь исправить???
<?php /** Enable W3 Total Cache */ define('WP_CACHE', true); // Added by W3 Total Cache /** Enable W3 Total Cache Edge Mode */ define('W3TC_EDGE_MODE', true); // Added by W3 Total Cache /** * The base configurations of the WordPress. * * This file has the following configurations: MySQL settings, Table Prefix, * Secret Keys, WordPress Language, and ABSPATH. You can find more information by * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing * wp-config.php} Codex page. You can get the MySQL settings from your web host. * * This file is used by the wp-config.php creation script during the * installation. You don't have to use the web site, you can just copy this file * to "wp-config.php" and fill in the values. * * @package WordPress */ define( 'WP_MEMORY_LIMIT', '64M' ); // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'mama'); /** MySQL database username */ define('DB_USER', 'mama'); /** MySQL database password */ define('DB_PASSWORD', '29081994'); /** MySQL hostname */ define('DB_HOST', 'maximbea.mysql.ukraine.com.ua:'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); /**#@+ * Authentication Unique Keys. * * Change these to different unique phrases! * You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service} * * @since 2.6.0 */ define('AUTH_KEY', 'U83@oNpY1hUFCMyF4OV#bqQr!6OZO8ZE91NO7m4KAT^OehxPq*c51JOTGZZk&!pH'); define('SECURE_AUTH_KEY', 'dn^WY)ly20C#pPI9qXkjgd@e83F%s$RhKLKhtkijP@6aJqlB*wHSrrH&s3QTVYMM'); define('LOGGED_IN_KEY', 'VyPy0(!ko)9IuoNgtnGOUV#40ge8jekHs3Uvhcrng7hahIz3xKNCF$QcfVA4lxzx'); define('NONCE_KEY', 'n!qW&F#jwgS@z2Qu%1sO7Scmi!W2P7AAC9VnfX6dsIF5i3ImPacE%T$Ueh0#8e6y'); define('AUTH_SALT', 'W6gDitV$p(S1kv)GbbLK4P$OBWXq#A9S%Sg7ME1mUim%&V^BfclY#JjAtslhOPam'); define('SECURE_AUTH_SALT', '@EbFuOVOaKej)(Re7&yvwgg!)huSU(B4#l22Dc)xu8NqLYotL$l5VsrqF%cFvT*D'); define('LOGGED_IN_SALT', 'zEk6AOwAAb5fjKrL*9OIVtj7m^lF5H$Yoo32xCe@0x0Wy(!ahTZ0AxS3kOXd6%Vn'); define('NONCE_SALT', 'G2fGkFJf3CsQt0x0oW8cHKV(gUE&54C)SvbNqsO3nV)PYfZJC&$0FLAfuy5UanLc'); /**#@-*/ /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ $table_prefix = 'wp_'; /** * WordPress Localized Language, defaults to English. * * Change this to localize WordPress. A corresponding MO file for the chosen * language must be installed to wp-content/languages. For example, install * de.mo to wp-content/languages and set WPLANG to 'de' to enable German * language support. */ define ('WPLANG', 'ru_RU'); define ('FS_METHOD', 'direct'); define('WP_DEBUG', false); /* That's all, stop editing! Happy blogging. */ /** WordPress absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); //--- disable auto upgrade define( 'AUTOMATIC_UPDATER_DISABLED', true ); ?>Очевидно DB_HOST на localhost.
менял не помогло
Эту строку:
define('DB_HOST', 'maximbea.mysql.ukraine.com.ua:');замените на следующую:
define('DB_HOST', 'localhost');спасибо помогли=)
Бгг. А как мжно было еще это изменить? 🙂
Просмотр 8 ответов — с 1 по 8 (всего 8)
Тема «Проблема с переносом сайта на локальный хостинг» закрыта для новых ответов.