OMG

Hi everyone ! ,

Today , in this new article we are going to see how to install wordpress on local machine, using xampp server from a docker image .

First step we are going to pull an image of xampp from docker hub , for that I have found this docker image , You can download it using this command from your power shell or your favorite command tool :

https://hub.docker.com/r/tomsik68/xampp/

while your pulling this image from docker hub , you can in same time , download word press from the official website the version that exist right now , while i’m writing this article is version : 5.2.2 .

After all is done , now let’s see our image and run it .

To see our image we simply type : docker images and if you have been using docker for a while , you will have a couple of images like I do in picture below .

OMG

  docker

docker run –name myXampp -p 41061:22 -p 41062:80 -d -v C:\Users\Heero\Downloads\Compressed\wordpress-5.2.2\wordpress:/www tomsik68/xampp

Now let’s understand this command .

The command above will expose the SSH server on port 41061 and HTTP server on port 41062.

one thing you should do is , to replace the directory where you have downloaded wordpress, for me ,

C:\Users\Heero\Downloads\Compressed\wordpress-5.2.2\wordpress , so in the command you should :

  docker

docker run –name myXampp -p 41061:22 -p 41062:80 -d -v Your directory :/www tomsik68/xampp

After you run the command , by typing : docker ps you will see your working container :

OMG

To connect to your web page, visit this URL: http://localhost:41062/www And to open up the XAMPP interface: http://localhost:41062/

OMG OMG OMG OMG OMG

Now one more free tip , if you try to install a plugin you will get an error .

WordPress will be asking for FTP credentials on localhost and for that , there is a fix in 2 steps .

  config.php

define(‘FS_METHOD’,‘direct’);

  Directory

now we need to change the permission in our installation folder to “Read & Write” for everyone :

OMG

Now , you are ready to go and to use your wordpress site and start publishing your articles !

Happy wordpress day 🙂