我正在將WordPress的網站從JustHost服務器遷移到VPS(Debian 8)。我已經成功安裝wordpress,除了空白的主頁和具有不同模板的唯一頁面以外,所有頁面都可以正常工作。我已經啓用調試和我收到提示:PHP在一臺服務器上工作,但不在另一臺服務器上
Parse error: syntax error, unexpected '<' in /var/www/wp-content/themes/goldistra/front-page-presentation.php on line 19
顯然有沒有錯誤的網站工作正常的第一臺服務器上。
當我從第13行到第19行的php代碼中刪除代碼時,網站終於顯示出來,但由於幻燈片庫沒有打開圖像,所以它仍然被破壞,Twitter小部件不工作,頁腳不顯示。
下面是從線13-19代碼示例:
<?php/* if (get_option('fppre_intro_heading') != ''): ?>
<h1><?php echo get_option('fppre_intro_heading'); ?></h1>
<?php endif; ?>
<?php if (get_option('fppre_intro_text') != ''): ?>
<p><?php echo get_option('fppre_intro_text'); ?></p>
<?php endif;
<h1><?php echo $post->post_title; ?></h1>*/?>
這裏有一些服務器的相關信息:
1. First (working) server
Date: Fri, 25 Sep 2015 11:53:32 GMT
Server: Apache
Vary: Accept-Encoding,Cookie,User-Agent
Cache-Control: max-age=3, must-revalidate
WP-Super-Cache: Served supercache file from PHP
Content-Encoding: gzip
Content-Length: 7165
Cache-Control: max-age=3600
Expires: Fri, 25 Sep 2015 12:53:32 GMT
Connection: close
Content-Type: text/html; charset=UTF-8
2. VPS
Date: Fri, 25 Sep 2015 12:06:00 GMT
Server: Apache/2.4.10 (Debian)
X-Pingback: http://151.236.10.228/xmlrpc.php
Link: <http://151.236.10.228/>; rel=shortlink
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 350
Connection: close
Content-Type: text/html; charset=UTF-8
我使用的PHP版本5.6.13對我的VPS
不恰當評論,並檢查PHP代碼,請檢查您的線從13至19 13個 – Prafulla
線條實際工作評價(沒有表現出良好的位置),所以有隻保留但nvm,當我刪除那些行仍然我的網站壞了:http://151.236.10.228/ +我有mySQL錯誤,我沒有設法解決,但我發現那些不影響網站佈局。 –
這是整個front-page-presentation.php:http://pastebin.com/FiLRa37D –