ローカルに、そしてオンラインサーバーでうまく動作する既存のWordPress Webサイトがあります。私はちょうど私のウェブサイトをHerokuに移したいと思う。 チュートリアルthisをフォローして私はHerokuにデプロイしました。ヒロクに展開した後に既存のwordpressを再インストールする必要があります
しかし、myappname.herokuapp.comにアクセスすると、WordPressを再インストールするように求められます。これをどうやって解決するのですか?
は私が/wp-admin/import.php
、/wp-admin/install.php
、/wp-admin/install-helper.php
、/wp-admin/upgrade.php
、および/wp-admin/upgrade-functions.php
を削除しました。
/wp-config.php:
/** This should point to the app directory */
define('WP_SITEURL', "http://" . $_SERVER["HTTP_HOST"]);
/** This is the URL your visitors will see */
define('WP_HOME', "http://" . $_SERVER["HTTP_HOST"]);
define('WP_CACHE', true);
define('WPLANG', 'vi_VI');
$url = parse_url(getenv('DATABASE_URL') ? getenv('DATABASE_URL') : getenv('CLEARDB_DATABASE_URL'));
/** The name of the database for WordPress */
define('DB_NAME', trim($url['path'], '/'));
/** MySQL database username */
define('DB_USER', $url['user']);
/** MySQL database password */
define('DB_PASSWORD', $url['pass']);
/** MySQL hostname */
define('DB_HOST', $url['host']);
/** 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', '');
/.htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
ありがとうございました。できます。 – Sam