We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
[HowTo] Configure and Speed Up WordPress with Memcached on PHP 7
[HowTo] Configure and Speed Up WordPress with Memcached on PHP 7
In this tutorials we’ll configure WordPress with Memcached on PHP 7.xx. Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
For this to work we need PHP MEMCACHED and Memcached package installed on your server. Memcached supports wide variety of OSs including Centos and Ubuntu, in this tut we’ll only cover the installation of memcached and pecl php memcached on Centos and on Ubuntu. Let’s get Started :
CentOS :
Install remi repo :-
Centos 7 :
Centos 6 :
Ubuntu 16.04 and above :
PHP MEMCACHED :
Now We’ll Build and install PHP MEMCACHED on php 7.xx (official) :
If you get SASL error then we need disable sasl flag added to the config:
Now you need to add this line to your php.ini to enable this php extension :
Then at last restart apache/php-fpm service and done, you can then check phpinfo and search “memcached” if it is there then you’ve successfully installed php-memcached and memcached.
WordPress Configuration with Memcached :
Now we need to go with WP configuration with memcached it is the simple process before proceeding make sure you’ve installed memcached and php memcached on php 7.xx.
Download this plugin on your PC : Memcached Redux
Extract and Find “object-cache.php” copy it to your WordPress “wp-content“ dir using FTP/SFTP/File-Manager
Done you’ve successfully Configured Memcached with WordPress.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
For this to work we need PHP MEMCACHED and Memcached package installed on your server. Memcached supports wide variety of OSs including Centos and Ubuntu, in this tut we’ll only cover the installation of memcached and pecl php memcached on Centos and on Ubuntu. Let’s get Started :
CentOS :
Install remi repo :-
Centos 7 :
Code: Select all
cd /usr/local/src
yum -y install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum -y --enablerepo=remi,remi install memcached
systemctl start memcached
systemctl enable memcached
Code: Select all
cd /usr/local/src
yum -y install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum -y --enablerepo=remi,remi install memcached
service memcached start
chkconfig memcached on
Code: Select all
apt-get install memcached libmemcached-tools
systemctl start memcached
systemctl enable memcached
PHP MEMCACHED :
Now We’ll Build and install PHP MEMCACHED on php 7.xx (official) :
Code: Select all
cd /root
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
git checkout php7
phpize
./configure
make
make install
Code: Select all
cd /root
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
git checkout php7
phpize
./configure --disable-memcached-sasl
make
make install
Code: Select all
extension=memcached.so
WordPress Configuration with Memcached :
Now we need to go with WP configuration with memcached it is the simple process before proceeding make sure you’ve installed memcached and php memcached on php 7.xx.
Download this plugin on your PC : Memcached Redux
Extract and Find “object-cache.php” copy it to your WordPress “wp-content“ dir using FTP/SFTP/File-Manager
Done you’ve successfully Configured Memcached with WordPress.