Use redis to accelerate your wordpress blog five times

Source: Internet
Author: User
Tags redis wordpress blog install redis

1. Install redis on the vps host

① I use the LNMP package, which comes with redis. Execute./redis. sh to automatically install and add it to self-start

② Install redis-server separately

# Apt-get install redis-server
Start redis-server and add the self-starting Project (refer to the specific method here, because some methods on linux are different)

2. Add the PHP client of redis-Server to wordpress

We recommend that you use predis. php (Download address) to upload predis. php to the wp root directory.

3. Download the new homepage of wp using redis

Index-with-redis.php (Download address), back up index. php in the original wp, change index-with-redis.php to index. php

4. Modify parameters in the index-with-redis.php as needed
// Change vars here
$ Cf = 1; // set to 1 if you are using cloudflare
$ Debug = 0; // set to 1 if you want to see execution time and cache actions
$ Display_powered_by_redis = 1; // set to 1 if you want to display a powered by redis message with execution time, see below

5. Upload to the wp root directory and refresh the webpage.

Note: If the wp is upgraded, you need to reset the two files in the preceding steps.

Next, upgrade and accelerate your wordpress site. Don't hesitate.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.