How To Speedup Your Wordpress Blog如何加速你的WordPress的博客

Advertisements广告

This is a Guest post by Ram from 这是一个客户后的公羊从 Teknobites Teknobites who blogs about Tech- news, Web 2.0, tools, tips and tweaks. 谁的博客对科技新闻, Web 2.0的,工具,技巧和调整。 Don’t forget to visit his blog for more news and 不要忘记他的博客访问更多的新闻和 Subscribe to his blog 订阅他的博客 for regular updates. 经常更新。

Wordpress is the best blogging platform available (some may not agree) with hundreds of plugins to tweak for your needs. WordPress的是最好的博客平台(可有些人可能不同意)与数以百计的插件来调整您的需求。 When you start your blog you may not need to optimize your blog to speedup but once your blog receives traffic or make it to the digg frontpage it is necessary to tweak it so that it runs faster.当您开始您的博客您可能没有需要优化自己的博客,以加速但一旦收到您的博客流量或使其向Digg的FrontPage中,有必要调整使其运行速度。 In this post we will see how we can speedup wordpress blogs with simple steps.在这个后,我们将看到我们如何才能加速WordPress的博客简单的步骤。

WordPress的

  • Themes like K2 are fancy and give a nice feel for the visitor but they consume lot of resources and effect page loading time.像K2的主题是幻想并给予很好的感觉访问者但它们消耗大量的资源和影响页面加载时间。 Use simple themes with less CSS and Javascript so that your blog runs smoothly.使用简单的主题少CSS和JavaScript ,使您的博客运行顺利。 If you have to use AJAX use where it is necessary.如果您必须使用AJAX的使用它是必要的。 You can even optimize CSS and Javascript with tools like你甚至可以优化CSS和JavaScript与工具,如 CSS Compressor压缩机的CSS and Javascript Compressor压缩机的Javascript .
  • Use plugins which are necessary, remove all unwanted plugins.使用插件这是必要的,删除所有不必要的插件。
  • Wordpress has a bulit in object cache but it is not enabled by default, you can enable this by adding the below lines to your wp-config.php file. WordPress的有装卸对象缓存,但它不是默认启用,您可以启用此加入以下行到您的可湿性粉剂, config.php文件。 You can notice the difference in performance later.你可以看到不同的性能更高版本。
    //enable Object Cache / /使对象缓存
    define(’ENABLE_CACHE’, true);界定( ' ENABLE_CACHE ' ,真正的) ;
    //define expiration time / /定义到期时间
    define(’CACHE_EXPIRATION_TIME’, 900);界定( ' CACHE_EXPIRATION_TIME ' , 900 ) ;
  • Wordpress has Gzip compression support you can enable this so that browsers with Gzip support will load your site faster. WordPress的gzip格式压缩已压缩的支持,您可以启用此,使浏览器支持gzip格式压缩负荷将您的网站速度更快。 This function is wp-admin >> Options >> Reading .这一功能可湿性粉剂管理员“ > ”选项“ > ”读。 This should be disabled if you plan to use Wp-cache plugin.这应该是残疾人,如果您打算使用涡喷缓存插件。
  • Use使用 Wp-cache涡喷缓存 plugin to cache posts in static files.插件缓存个静态文件。 These files are served for future requests with out compiling PHP code and building the page from the database.这些文件是为未来的服务请求进行编译PHP代码和网页建设的数据库。 This is a must use plugin when you are dugg.这是一个必须使用的插件当你dugg 。 Remember Gzip compression should be disabled to use this plugin.记住gzip格式压缩应当压缩残疾人使用这个插件。
  • Try to minimize the external scripts on your sidebar these include Mybloglog, Blogcatalog and other javascript widgets.尽量减少外部脚本栏上的这些包括Mybloglog , Blogcatalog和其他JavaScript工具。
  • You can serve TLA and other affiliate banners from your own server instead of loading the images remotely.您可以提供顶级聚类和其他附属横幅从您自己的服务器而不是加载远程图片。 (This may consume your bandwidth but you are no longer dependent on external server speed) (这可能会消耗你的带宽,但你已不再依赖于外部服务器的速度)
  • The below tips are only useful if you have a dedicated server. 下面的提示是唯一有用如果你有一个专用的服务器。

  • Install PHP Compiler Cache scripts like eAccelerator or Zend Optimizer on your server.安装PHP编译器高速缓存的脚本一样eAccelerator或Zend的优化在您的服务器上。 These scripts will cache PHP scripts in their compiled state so that the server don’t have to compile PHP scripts each and every time they called from wordpress.这些脚本将缓存PHP脚本在编译状态,以便服务器没有编译PHP脚本每次他们呼吁从WordPress的。
  • Enable Mysql query cache: Mysql query cache saves query results and serves it when the same query comes again.启用MySQL查询高速缓冲: MySQL查询高速缓冲储存查询结果和服务时相同的查询来一次。 You can add the below 2 lines to your /etc/my.cnf file to enable this.您可以添加以下两行到您的/ etc / my.cnf文件,以使这一点。
    query_cache_type = 1 query_cache_type = 1
    query_cache_size = 33554432 query_cache_size = 33554432
    The query cache parameter tells how much memory to use, in this case it is 32M.查询缓存参数告诉多少内存使用,在这种情况下,它是保管箱。

Now apply some of these tweaks if not all and make your Wordpress to run faster.现在适用于其中的一些微调如果不是全部的话,使你的WordPress的运行速度更快。 Do let me know if you use any other tweaks to speedup your blog.不要让我知道如果您使用任何其他的调整,以加速您的博客。

Share this Post分享这个邮报

StumbleUpon公司- 4848.pngDigg的- 4848.pngTechnorati的- 4848.png供稿- 4848.png美味- 4848.png

Comments评论

  • Vijay 维杰 said: 说:

    Interesting set of tips here, Ram!有趣的秘诀在这里,拉姆! I need to implement a few of them myself!我必须执行少数人自己!

  • Ken Xu 徐肯 said: 说:

    OW, wish I had the dedicated server!超重,希望我的专用服务器! : )
    Nice tips, wp-cache is sure one of the good way to optimize download time.尼斯提示,可湿性粉剂缓存是肯定的一个好办法,优化下载的时间。 But it’s kind of annoying if you try to modify your theme or else because it will not appear immediately.但是,这种恼人如果您尝试修改您的主题,否则,因为它将不会立即显示。 Need to clear the cache and disable it before begin tweaking.需要明确的缓存和禁用它之前开始调整。 : )

  • Sumesh Sumesh said: 说:

    Nice tips - but people need to be minimalist to take off JS widgets and plugins.尼斯秘诀-但人需要得到最低限度的起飞,江苏工具和插件。 I am, for one !我相信,对于一个!

    You might also want to take a look at similar post I wrote some time back, and was stumbled heavily:您也可以看看类似后我写的一段时间回来,是偶然重:
    Have you optimized your blog?你优化你的博客?

    You should add one more bit to #1 - use PHP compression for stylesheet(see my post for details).您应该增加一个钻头# 1 -使用P HP压缩表(见我的职务详情) 。

  • Bush Mackel 布什━迈克尔 said: 说:

    Good tips.良好的小费。 I can vibe with the whole complicated theme thing too.我可以盛传与整个复杂的事情太多主题。 I think the mess of a theme I use has been slowing things up quite a bit.我认为,混乱的一个主题我使用已经放缓的事情了相当多的。 It doesn’t help either that I had a huge error that was coming up every time someone tried to access my site!它没有任何帮助,我有一个巨大的错误,是即将每次有人试图访问我的网站!

    That’s what I get for using a theme that includes a million php files.这就是我使用的一个主题,其中包括100万PHP文件。 *rolling eyes* *滚动眼睛*

  • Ashish Mohta Ashish Mohta said: 说:

    Wp-cache is a good plugin if you cant afford for hosting but I guess paying 10 to 20$ month is not a big deal and You should be able to host your site nicely.涡喷缓存就是一个很好的插件如果您不能负担不起主办,但我想支付10至20美元一个月不是一个大问题,您应该能够代管您的网站不错。

    I had been in dig with 60000 hits in 24hrs with all scripts running including related post .我一直在挖掘与60000安打, 24小时与所有脚本运行包括相关的职位。 My host never said anything to me on that.我从来没有说过东道国对我没什么了。
    The inbuilt chache property I was not aware of that.内在chache财产我不知道这一点。 I would find in wordpress codex to see more about it我想找到WordPress的抄本看到更多关于它

  • ram 公羊 said: 说:

    Thanks to Nirmal for this oppurtunuty and to all of you who have commented.由于本Nirmal和oppurtunuty向大家谁都发表了意见。
    @Sumesh @ Sumesh
    I am not aware of this, i will check your post.我不知道这一点,我会检查您的帖子。 Thanks for the info谢谢您的信息
    @Ashish @ Ashish
    You are lucky, when my site is on digg front page it is my mysql server is down for sometime, in that short time i removed K2 theme and implemented few tweaks and then it went well.你是幸运的,当我的网站是Digg的头版这是我的数据库服务器已关闭一段时间,在这短短的一次我删除K2主题,并实施一些调整,然后进行得很顺利。

  • Ashish Mohta Ashish Mohta said: 说:

    @Ram: That was not luck but Because my host is powerful enough to keep up with those affects. @拉姆:这不是运气,而是因为我的主机是足够强大的跟上这些影响。 I have no optimization done not even css clean up or even Javascript reduction.我没有做优化的CSS甚至不清理,甚至减少的Javascript 。

    It depends largely on your host.这在很大程度上取决于你的主机。 I am on shared hosting and pay around 10$ a month thats it.我就共同主办,并支付约10 $一个月多数民众赞成它。

  • DJSays! DJSays ! said: 说:

    Interesting tips.有趣的提示。 I need to check them out in details and optimise my blog with it.我需要查看这些细节和优化我的博客的。

    Thanks for this post man!感谢这个职位的人! Keep it coming!保持来啦!

  • Ashish Mohta Ashish Mohta said: 说:

    I looked around for the inbuilt cache you mentioned there.我看了看周围的内置缓存有你所提到的。 It has some issues and are really not recommended for shared hosting.它有一些问题,确实不建议共同主办。 Here is a small discussion and这里是一个小型的讨论和 using wordpress object cache使用WordPress的对象缓存

    # Mark Jaquith #马克雅奎斯
    Posted 7/25/2006 at 4:40 pm | Permalink发布06年7月25号在下午4点40分|永久链接

    One of the biggest misconceptions is that the object cache invalidates the need for an output (HTML) cache.其中最大的误解是,缓存的对象无效,需要有一个输出( HTML )的高速缓存。 It doesn’t.它没有。 The object cache saves a few MySQL queries and a few PHP cycles structuring the results of those queries, but it still leaves many queries for MySQL, and it still requires that WordPress be fully loaded for each hit.对象缓存节省几个MySQL的查询和一些PHP的周期结构的结果查询,但它仍有许多MySQL的查询,它仍然需要WordPress的是满载每个击中。 WP-Cache2 is still extremely useful for caching your HTML output.可湿性粉剂, Cache2仍是极为有益的缓存你的HTML输出。

    It should also be noted that not everyone will benefit from using the built-in disk-based object cache.还应当指出,不是每个人都将受益于使用内置的基于磁盘的对象缓存。 I strongly suggest that you measure execution time and compare.我强烈建议您措施的执行时间和比较。 If you have full access to your server (dedicated or virtual), I suggest you look into alternative storage engines for the object cache, such as the ones using Memcached or APC, as this data will return more quickly than from the disk cache.如果您有充分机会获得您的服务器(专用或虚拟) ,我建议你考虑选择存储引擎的缓存的对象,如使用Memcached的或装甲运兵车,因为这一数据将返回之快,超过了从磁盘高速缓存。

    #2 David Chait # 2大卫柴

    I just wanted to chime in full agreement with Mark.我只是想磬完全同意马克。 Generally the object cache should NOT be used, unless you know your server setup and performance factors VERY well.一般来说缓存的对象不应使用,除非您知道您的服务器安装和性能的因素非常好。 It has even been proven detrimental (seriously in certain instances) on shared hosting setups.它甚至被证明有害的(认真地在某些情况下)就共同主办的设置。 If you have a dedicated server, then the alternative memory cache engines become useful — but only if you aren’t already running a mysql query cache of a decent size…如果您有一个专门的服务器,然后选择内存高速缓存引擎成为有用的-但是只限于如果您尚未运行M ySQL查询高速缓冲一个体面的大小. .. ; )

    #3 Dougal # 3杜格尔

    Mark and David,马克和大卫,

    Thanks for pointing out more details on possible downsides to using the object cache.谢谢指出更详细的缺点可能使用对象缓存。 I didn’t want to sidetrack into that tangent in my article, partially to keep it short, and partially because I’m not familiar myself with just what factors might be involved.我并不想避开这个切线在我的文章,部分保持短,部分是由于我不熟悉自己只有哪些因素可能参与。 Personally, I am on a dedicated server (at least for all practical purposes), and the object cache works fine for me.就个人而言,我在一个专门的服务器(至少在所有的实际目的) ,以及高速缓存对象的作品对我罚款。 But I also use WP-Cache2, MySQL query caching, and the APC PHP opcode cache.但我也使用涡喷Cache2 , MySQL查询缓存,和装甲运兵车的PHP优化代码缓存。

  • ram 公羊 said: 说:

    @Ashish @ Ashish
    Thanks for the info, i will check that谢谢您的信息,我将检查

  • Jalaj Jalaj said: 说:

    Nice tips… I particularly liked the two 1) using light themes 2) using wp-cache they surely will prevent server from overloaded.尼斯秘诀...我特别喜欢的两个1 )利用光的主题2 )使用可湿性粉剂缓存,他们一定会防止服务器超载。

  • Shankar Ganesh 艾亚尔Ganesh said: 说:

    Nice tips there, Ram.尼斯提示有公羊。 WP Cache plugin will be of great use.可湿性粉剂缓存插件将极大地使用。

  • Aseem Kishore Aseem纪 said: 说:

    Excellent tips Ram!优秀的秘诀拉姆! Keep up the good work.保持良好的工作。 Also, you guys might want to check out the new WP-SuperCache plugin.另外,你们可能要检查新的涡喷SuperCache插件。 I am using it and it’s made a good bit of difference.我用它和它开了一个好一点的不同。

    Aseem

  • Alfred 阿尔弗雷德 said: 说:

    I had forgotten about Gzip compression.我忘记了gzip格式压缩的压缩。 Thx for reminding me 172提醒我 :微笑:

  • clara 克拉拉 said: 说:

    Thanks for the list.感谢名单。 I need it at this point in time.我需要它在这个时候。 Getting tired of waiting for things to load.乘车厌倦了等待的事情负荷。

  • Fahad 法赫德 said: 说:

    Wow, nice tips.哇,好建议。 I will probably be implementing some of these tips in my blog soon.我将可能会执行其中的一些技巧在我的博客很快。 Bookmarked it for now!书签它了! :微笑:

  • Yunus Yesilmen 尤努斯Yesilmen said: 说:

    Are u using all technique or which? ü使用的所有技术或?

  • Tech Updates 技术更新 said: 说:

    Thats a superb guide on speeding the wordpress, but i guess 2.5x versions are already quick enough when compared to the older versions.多数民众赞成在被上指导加快WordPress的,但我猜2.5倍版本已经够快时相比,旧版本。

Trackbacks搬场

There are no trackbacks没有搬场


Add a comment添加评论

Translate Page网页翻译

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanПереведите к русскому/RussianΜεταφράστε στα ελληνικά/GreekVertaal aan het Nederlands/Dutchترجمة الى العربية/Arabic中文翻译/Chinese Traditional
中文翻译/Chinese Simplified한국어에게 번역하십시오/Korean日本語に翻訳しなさい /JapaneseTraduza ao Português/PortugueseTraduca ad Italiano/ItalianTraduisez au Français/FrenchTraduzca al Español/Spanish
Nirmal is a Software Engineer and Technology Blogger. Nirmal是一个软件工程师和技术的Blogger 。 He is a Microsoft Most Valuable Professional in Windows Desktop Experience.他是微软最有价值专家在Windows桌面体验。
mvp印度技术博客