php – 在服务器上上传WordPress网站时显示默认主题

前端之家收集整理的这篇文章主要介绍了php – 在服务器上上传WordPress网站时显示默认主题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我在服务器上上传我现有的wordpress网站.它不显示精确,因为它在本地机器上.我已经将链接 http://localhost更改为 http://mywebsite链接在.sql文件,甚至比它不显示在本地机器本地…

在本地机器看起来像这样…

当我上传它的服务器上的所有包,它的显示默认主题像这样..

我应该怎么做,就像在本地机器上看到的一样…

我已经尝试使用复制器插件在服务器上迁移它,并手动尝试,如我先从本地服务器导出数据库,然后在记事本中打开它.之后,我发现整个文件中的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:"example@mymail.com";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/.
但是当我改变它的显示默认主题.所以请告诉我如何更改它.

通常,主题设置以编码方式存储在数据库中.例如,背景图像设置将会像这样:
background:14:path\/image.jpg

所以选项以这种格式存储:

type:length:value

如果您更改背景图像的路径,那么它将更改值的长度,因此length属性将不再有效.它将导致设置导入失败(所有编码的字符串将被视为无效),而主题将使用默认选项.

主题通常具有导入/导出功能.您应该检查,如果没有这样的功能,那么您将不得不再次设置所有主题选项,或者在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;

并使用此新字符串更新该选项.

猜你在找的PHP相关文章