我正在用我遇到的這個問題撕裂我的頭髮。我正在安裝Wordpress到我的NearlyFreeSpeech網絡服務器上。我已經建立了我的MySQL數據庫等等,它工作得很好。我建立了一個名爲wpuser
的用戶和一個名爲wpuser
的數據庫,並給出了wpuser
創建/刪除等的適當權限。在NearlyFreeSpeech託管服務器上設置Wordpress
我編輯我的wp-config.php
究竟是如何NearlyFreeSpeech常見問題列表。
在命中安裝按鈕我得到的錯誤是這樣的:
WordPress database error: [Can't create/write to file '/var/wordpress/wp_users.MYI' (Errcode: 2)]`
然後就是漫長的MySQL查詢如下。我沒有權限訪問服務器上公共/私人文件夾以外的任何內容,所以我不知道爲什麼Wordpress會嘗試將自己安裝到var文件夾中,或者至少訪問不在其中的文件夾。
的搜索建議我給WordPress的一個臨時目錄中一點點,這是我使用此代碼完成的:
if (!defined('WP_TEMP_DIR'))
define('WP_TEMP_DIR', dirname(__FILE__) . '/tmp/');
我如何能得到這個東西實際安裝有什麼建議?
我wp-config.php
:
<?php
/**
* 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
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wpuser');
/** MySQL database username */
define('DB_USER', 'wpuser');
/** MySQL database password */
define('DB_PASSWORD', "passwordhere");
/** MySQL hostname */
define('DB_HOST', 'nescience.db');
/** 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', '');
if (!defined('WP_TEMP_DIR'))
define('WP_TEMP_DIR', dirname(__FILE__) . '/tmp/');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
/**#@-*/
/**
* 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_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
* language support.
*/
define('WPLANG', '');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** 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');
您是否使用了正確的數據庫服務器?它可能不是'localhost',但我不知道NearlyFreeSpeech設置的細節。 –
錯誤代碼2意味着沒有找到文件,我相信。你確定你已經指定了正確的主機服務器嗎? – ggdx
我的數據庫主機是其常見問題解答建議的' .db'。如果我使用不同的垃圾信件,頁面甚至不會加載,它只是給我提供了'建立數據庫連接的錯誤'。所以,遺憾的是我不認爲這是問題。 如果'errcode 2'找不到文件,爲什麼要在'/ var'下尋找一個wordpress目錄? –
taylorthurlow