Sample Header Ad - 728x90

Install memcache for Wordpress on debian with php-fpm

1 vote
4 answers
1753 views
The install instructions for memcache are not really up-to date. How do I install on Debian using php-fpm and nginx? I tried this: apt install memcache zlib1g-dev php-dev pecl install memcache This will install the extension into /usr/lib/php/20220829/memcache.so So I added echo extension = memcache.so>>/etc/php/8.1/fpm/php.ini Then restarted service php8.1-fpm restart Now I want to install the "Memcached Object Cache" Wordpress Plugin, but the [plugin-website](https://de.wordpress.org/plugins/memcached/#installation) just sais: > 1. Install memcached on at least one server. Note the connection info. The default is 127.0.0.1:11211. > > 1. Install the PECL memcache extension > > 1. Copy object-cache.php to wp-content > > 1. Add the WP_CACHE_KEY_SALT constant to the wp-config.php: > > define( 'WP_CACHE_KEY_SALT', '...long random string...' ); I cannot find object-cache.php anywhere. --- The problem is, that phpize will use php8.2 to compile the extension. but if I uninstall php8.2, I also uninstall php-dev. If I reinstall it, it will try to install php8.2 again ;( How do I solve this?
Asked by rubo77 (30435 rep)
Apr 11, 2023, 01:40 PM
Last activity: Jun 9, 2025, 10:16 AM