我正在從事一個項目,涉及從A點到B點遷移WordPress安裝。它應該相當簡單,但是手動或基於插件的傳輸都不起作用。解釋:WordPress遷移到不正確的路徑損壞的子域
A點是'demo.com'的一個相當標準的安裝,我試圖將它遷移到一個子域(B點),比如'c.example.com'。當然,我可以遷移代碼,插件,主題等等,但是當我將數據庫引入時,一切都變得不合時宜(並且我更新了數據庫中的網站URL /主頁URL /某些永久鏈接結構)。
的代碼從<head>
標籤內的片段展示了一些有趣的信息:
<link rel="stylesheet" id="parent-style-css" href="http://c.#wp-content/themes/Example_theme/style.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="style-css-css" href="http://c.#wp-content/themes/Example_theme/style.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="layout-css" href="http://c.#wp-content/themes/Example_theme/css/layout.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="main-css" href="http://c.#wp-content/themes/Example_theme/css/main.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="shortcodes-css" href="http://c.#wp-content/themes/Example_theme/css/shortcodes.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="mediaelement-css" href="http://c.#wp-includes/js/mediaelement/mediaelementplayer.min.css?ver=2.18.1" type="text/css" media="all">
<link rel="stylesheet" id="prettyPhoto-css" href="http://c.#wp-content/themes/Example_theme/css/prettyPhoto.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="responsive-css" href="http://c.#wp-content/themes/Example_theme/css/responsive.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="instag-slider-css" href="http://c.#wp-content/plugins/instagram-slider-widget/assets/css/instag-slider.css?ver=1.2.1" type="text/css"
更仔細地看,你可以看到在href /路徑不包含「example.com」的域名,而是用「#」代替。
http://c.#wp-content/themes/Example_theme/css/responsive.css?ver=4.4.2
還注意到,我已經更新了WP-config文件來定義WP_HOME和WP_SITE的URL,這沒有任何影響。 htaccess的也被修正爲子域(其還沒有作用),它讀取:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /c/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . //index.php [L]
</IfModule>
# END WordPress
這樣做的原因似乎是在數據庫內某處,但有可能是一個文件的地方,是控制這個。
任何援助是值得歡迎的,非常感謝。
再次感謝您與我的問題。