2015-07-13 150 views
10

當我上傳服務器上的現有WordPress網站時。它沒有像在本地機器上一樣顯示。我已經改變了鏈接http://localhost到甚至比它不完全顯示,因爲它是本地計算機上的本地.SQL文件http://mywebsite鏈接...在服務器上傳WordPress網站時顯示默認主題

在本地機器上的看起來像這樣...

enter image description here

當我上傳它的服務器上的所有包,那麼它是這樣表現的默認主題..

enter image description here

我應該怎麼做就像在本地機器上看起來一樣...

我已經嘗試過使用複製器插件將它遷移到服務器上,並且還像我手動嘗試它一樣從本地服務器導出數據庫,然後在記事本中將其打開。之後,我找到整個文件的localhost鏈接,並將其替換爲我的網站鏈接,如:www.mywebsite.com/pmx2,然後將其上載到我的主服務器上... 當我在更新鏈接中更改enigma_option表數據時,它顯示默認其他主題及其工作罰款,我想除了滑塊的圖像和我們團隊部分圖片...

這裏是我的enigma_option表中的數據:

_ a:74:{s:17:"upload_image_logo";s:61:"http://jeeaayanu.com/pmx2/wp-content/uploads/2015/05/logo.jpg";s:6:"height";s:3:"100";s:5:"width";s:3:"200";s:10:"_frontpage";s:1:"1";s:10:"text_title";s:0:"";s:20:"upload_image_favicon";s:0:"";s:10:"custom_css";s:21:"background-color:gray";s:13:"slide_image_1";s:109:"http://localhost/port/wp-content/uploads/2015/05/studying-699485_1280_pixabay_crop640_resize1080-1080x420.png";s:13:"slide_title_1";s:11:"Slide Title";s:12:"slide_desc_1";s:47:"pmp experto pmp experto pmp experto pmp experto";s:16:"slide_btn_text_1";s:9:"Read More";s:16:"slide_btn_link_1";s:10:"google.com";s:13:"slide_image_2";s:97:"http://localhost/port/wp-content/uploads/2015/05/book-408302_1280_pixabay_resize1080-1080x420.jpg";s:13:"slide_title_2";s:22:"variations of passages";s:12:"slide_desc_2";s:65:"Contrary to popular belief, Lorem Ipsum is not simply random text";s:16:"slide_btn_text_2";s:9:"Read More";s:16:"slide_btn_link_2";s:1:"#";s:13:"slide_image_3";s:72:"http://localhost/port/wp-content/uploads/2015/05/slide4_1080-856x333.jpg";s:13:"slide_title_3";s:19:"Contrary to popular";s:12:"slide_desc_3";s:63:"Aldus PageMaker including versions of Lorem Ipsum, rutrum turpi";s:16:"slide_btn_text_3";s:9:"Read More";s:16:"slide_btn_link_3";s:1:"#";s:8:"fc_title";s:75:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. ";s:10:"fc_btn_txt";s:13:"More Features";s:11:"fc_btn_link";s:1:"#";s:30:"header_social_media_in_enabled";s:1:"1";s:34:"footer_section_social_media_enbled";s:1:"1";s:12:"twitter_link";s:1:"#";s:7:"fb_link";s:42:"https://www.facebook.com/bajrang.mittal.58";s:13:"linkedin_link";s:1:"#";s:12:"youtube_link";s:1:"#";s:9:"instagram";s:1:"#";s:5:"gplus";s:1:"#";s:8:"email_id";s:18:"[email protected]";s:8:"phone_no";s:10:"0159753586";s:21:"footer_customizations";s:25:" © 2015 Enigma Theme";s:17:"developed_by_text";s:18:"Theme Developed By";s:26:"developed_by_weblizar_text";s:15:"Weblizar Themes";s:17:"developed_by_link";s:20:"http://weblizar.com/";s:20:"home_service_heading";s:0:"";s:15:"service_1_title";s:15:"UPCOMING EVENTS";s:15:"service_1_icons";s:12:"fa fa-google";s:14:"service_1_text";s:16:"Delhi 11-10-2014";s:14:"service_1_link";s:1:"#";s:15:"service_2_title";s:12:"Testimonials";s:15:"service_2_icons";s:14:"fa fa-database";s:14:"service_2_text";s:155:"I have recently got my PMP cleared...... 

I would like to thank Praveen Sir for providing superb...... 

I was fortunate to be coached by Praveen.......";s:14:"service_2_link";s:1:"#";s:15:"service_3_title";s:14:"Free Resources";s:15:"service_3_icons";s:15:"fa fa-wordpress";s:14:"service_3_text";s:41:"PMBOK ACRONYMS 

PMP TIPS 

PMP FORMULA";s:14:"service_3_link";s:1:"#";s:14:"portfolio_home";s:1:"1";s:12:"port_heading";s:15:"OUR INSTRUCTORS";s:10:"port_1_img";s:60:"http://localhost/port/wp-content/uploads/2015/05/imagesc.jpg";s:12:"port_1_title";s:11:"Ashwini Rao";s:11:"port_1_link";s:37:"http://localhost/port/index.php/team/";s:10:"port_2_img";s:61:"http://localhost/port/wp-content/uploads/2015/05/Pervesh3.jpg";s:12:"port_2_title";s:15:"Parvesh Dhingra";s:11:"port_2_link";s:48:"http://localhost/port/index.php/parvesh-dhingra/";s:10:"port_3_img";s:60:"http://localhost/port/wp-content/uploads/2015/05/Sandeep.jpg";s:12:"port_3_title";s:15:"Sandeep Shouche";s:11:"port_3_link";s:48:"http://localhost/port/index.php/sandeep-shouche/";s:10:"port_4_img";s:59:"http://localhost/port/wp-content/uploads/2015/05/indexa.jpg";s:12:"port_4_title";s:13:"Praveen Malik";s:11:"port_4_link";s:46:"http://localhost/port/index.php/praveen-malik/";s:9:"show_blog";s:1:"1";s:10:"blog_title";s:11:"Latest Blog";s:33:"weblizar_settings_save_home-image";s:1:"1";s:11:"style_sheet";s:14:"light-blue.css";s:30:"weblizar_settings_save_general";s:1:"1";s:41:"weblizar_settings_save_portfolio-settings";s:1:"1";s:35:"weblizar_settings_save_home-service";s:1:"1";s:29:"weblizar_settings_save_social";s:1:"1";} 

在這裏,我給的鏈接http://localhost/port/更改爲http://jeeaayanu.com/pmx2/ 。 但是,當我改變它顯示默認主題。所以請告訴我如何改變它。

+0

你沒有告訴我們你如何將網站遷移到在線服務器。還有什麼問題,圖像?還是其他的東西呢? – ThemesCreator

+0

我現在編輯我的問題..所以請再看看問題.. –

+1

我沒有時間寫一個完整的答案,但我可以告訴你,你不能使用文本編輯器「查找並替換URL」。由於數據庫值是序列化的,因此您將損壞數據,並且可能會回退到主題默認值(基於您的屏幕截圖)。我會使用migrate db pro或備份好友,這裏有一個鏈接: https://deliciousbrains.com/wp-migrate-db-pro/videos/ –

回答

2

通常主題設置以編碼方式存儲在數據庫中。對於爲例背景圖像設置將那種看起來像:

background:14:path\/image.jpg 

所以選項存儲格式爲:

type:length:value 

如果你改變你的背景圖片的路徑,那麼這將改變值的長度 - 所以長度屬性將不再有效。這將導致設置導入失敗(所有編碼的字符串將被視爲無效),主題將使用默認選項。

通常主題具有導入/導出功能。你應該檢查,如果沒有這樣的功能,那麼你將不得不再次設置所有主題選項,或者在wp_options中查找主題選項編碼字符串,並使用以下腳本來修復長度:

$corrupted_serialized_data = '... your theme option strings here from option_value ...'; 
$fixed_serialized_data = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $corrupted_serialized_data); 
print $fixed_serialized_data; 

並用此新字符串更新選項。

+0

如何檢查主題是否具有導入/導出功能? –

+0

我沒有在您的[https://weblizar.com/documentation/themes/enigma-premium-documentation/](主題文檔)中看到有關導入/導出功能的任何參考,所以我不覺得那裏存在是這樣的選擇。你可以登錄你的phpMyAdmin,執行以下查詢:'SELECT * FROM wp_options WHERE option_name LIKE「%enigma%'」並分享結果? – vard

+0

我得到了兩條記錄: - option id:-138,option_name:theme_mods_enigma,option_value:a:2:{i:0; b:0; s:18:「nav_menu_locations」; a:1:{s:7 :「primary」; i:2;}},autoload:是的 –

0

要做的第一件事就是壓縮您在本地機器上創建的主題。

然後導出數據庫。我建議使用phpmyadmin,但任何數據庫導出都會執行(.sql文件)。

然後你建立你的WordPress的在線。數據庫和所有。安裝你的主題和不要去前端

現在使用這個nifty script for replacing old links in DB with new one。並按照網站上提供的步驟(這真的很簡單,只需設置來自數據庫的舊信息和新信息並進行空運行)。

備份一切

這將搜索從本地主機舊鏈接,並與現場服務器上的那些取代他們。

如果您確定一切正常,只需點擊live run並讓它替換鏈接即可。在這之後,你應該在你的服務器上有一個和你的本地機器一樣的wp。

每次都適合我。

+0

我已經跟着這些步驟了。我改變了所有本地鏈接到服務器的鏈接,然後將其導入到服務器但仍然顯示相同的問題.. –

+0

我也試過它與Duplicator插件,是用來移動您的本地WordPress網站server.But我沒有得到解決方案爲此也.. –

+0

我從不信任插件。這可能是最安全的方法。唯一與當地不同的是徽標和滑塊,對吧? –

0

我不認爲你的主題有問題。

到目前爲止,我明白你的問題,你沒有上傳文件總數在直播現場,

你上傳其位於的wp-content文件夾上傳文件夾?

上傳整個wp-content而不是你的主題是很好的。

更新數據庫後,內容也應該在那裏,以便您可以顯示所需內容。

另外不要忘了從後臺切換主題。

Click Here to know how to live your site

乾杯:)!

相關問題