22

While doing some web development, I needed to have Memcached (source code) installed on my local machine to closely simulate what was going on my server.

How to install Memcached on Windows?

Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144

2 Answers2

34

Steps to install Memcached on Windows:

  1. Download a stable version, in either 32-bit or 64-bit I have tested the 64-bit version.
  2. Unzip it in some hard drive folder. For example C:\memcached
  3. There will be memcached.exe file in the unzipped folder.
  4. Open a command prompt (need to be opened as administrator).
  5. Run c:\memcached\memcached.exe -d install

For start and stop run following command line

c:\memcached\memcached.exe -d start
c:\memcached\memcached.exe -d stop
Mark Whitaker
  • 8,465
  • 8
  • 44
  • 68
Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144
  • 2
    Don't forget to run `cmd` as Administrator, otherwise service may fail to install. – Konrad Gałęzowski Sep 02 '21 at 14:57
  • 3
    https://memcached.org/downloads – Eagle_ Feb 22 '22 at 08:55
  • use the complete URL, copy and paste in browser for downloading memcached : for 64 bit : http://static.runoob.com/download/memcached-win64-1.4.4-14.zip – Learner Apr 05 '22 at 17:32
  • 4
    Linking to binaries on some random Chinese website seems dodgy. – gre_gor Aug 16 '22 at 15:44
  • 6
    A [windows port](https://github.com/jefyt/memcached-windows) is now available on GitHub with binaries. It looks more trustworthy to me. – Frédéric Sep 04 '22 at 16:44
  • 1
    https://static.runoob.com/download/memcached-win64-1.4.4-14.zip This is an official from memcached.org ? I can only download source code from official website. How I can install from source code? – Vũ Anh Dũng Sep 19 '22 at 14:54
  • Is this official? Because, as I can read on the official repository, they do not provide official support for Windows. https://github.com/memcached/memcached/wiki/Install – Ketan Chaudhari Sep 01 '23 at 09:45
1

As told in some previous comments the v1.4.4 is sometimes coming from a trusted source, sometimes not and it becomes hard to find. But there is now a very stable Windows native port for both 32 bits and 64 bits versions.

https://github.com/jefyt/memcached-windows

It's running well on our two PHP servers (PHP7 and PHP8). Hope this helps.

Another Cygwin version is also available here and runs well too https://github.com/nono303/memcached

b126
  • 544
  • 4
  • 11
  • Hi b126, could you please help with how to configure it with PHP 8? What should we place in the extension directory of PHP, I didn't find the .dll file in the zip which I downloaded. – Suraj Nov 18 '22 at 03:50
  • Do you already have a Memcached instance running? If so, then you can install the appropriate extensions for PHP that will use your Memcached instance. This describes how to do : https://stackoverflow.com/questions/14777857/how-to-install-and-use-memcached-in-windows-for-php – b126 Nov 18 '22 at 10:14
  • The PHP-MEMCACHED extension is available here: https://github.com/php-memcached-dev/php-memcached. php_memcached.dll should go your \php\ext directory. libmemcached.dll and libhashkit.dll should go to a path folder – b126 Dec 02 '22 at 11:01