How To Install And Remove WordPress Website On macOS Using XAMPP

I have told you how to install, start, stop XAMPP on macOS in the first part of the article How To Connect To MySQL Server After Install XAMPP On Mac OS. In this article, I will tell you how to install and uninstall the WordPress website on the macOS XAMPP server. It also tells you how to remove XAMPP from the macOS server entirely.

1. Start XAMPP Server.

  1. Open macOS Finder, click Applications item on left.
  2. Double click the XAMPP application icon on the right side to open it.
  3. Click the Start button to start the XAMPP server or make sure XAMPP is started ( The Status point is green and the IP Address is shown. ).
  4. Click the Volumes tab, then click the Mount button to mount the /opt/lampp directory.

2. How To Install WordPress WebSite On macOS XAMPP Server.

  1. Download the latest WordPress version to your local mac.
  2. Click the XAMPP Volumes tab,  click Explore button to open a Finder window.
  3. Copy downloaded WordPress zip file to htdocs —> wordpress install folder and unzip it in macOS Finder window.
  4. Now input your WordPress website URL ( http://xampp-server-ip/wp-install-folder/ ) into the web browser URL address textbox. Click Enter key, it will direct you to the WordPress website setup page.
  5. Click Let's go! button, you will be directed to the WordPress database setup page. You can create a MySQL database
  6. After installing the WordPress website on XAMPP, the website folder( wordpress install folder )’s owner has been changed to bitnami by default, but we should change it to the root user. Otherwise, you will encounter errors later.
    root@debian:/opt/lampp/htdocs# ls -al
    total 68
    drwxr-xr-x  6 bitnami root     4096 Dec  3 14:50 .
    drwxr-xr-x 25 root    root     4096 Jul 22  2019 ..
    -rw-r--r--  1 bitnami root     3607 Feb 27  2017 applications.html
    -rw-r--r--  1 bitnami root      177 Feb 27  2017 bitnami.css
    drwxr-xr-x  5 bitnami bitnami  4096 Dec  3 14:51 codelearner
    drwxrwxr-x 20 bitnami bitnami  4096 May 10  2018 dashboard
    -rw-r--r--  1 bitnami root    30894 May 11  2007 favicon.ico
    drwxr-xr-x  2 bitnami root     4096 Jul 22  2019 img
    -rw-r--r--  1 bitnami root      260 Jul  9  2015 index.php
    drwxrwxr-x  2 bitnami daemon   4096 Jul 22  2019 webalizer

3. How To Remove WordPress WebSite From macOS XAMPP Server.

  1. It is very easy to remove the WordPress website from the XAMPP server.
  2. Wrong Action: Click Explore button to open a Finder window which will open lampp mount point, click htdocs to open it, then right-click the wordpress-web-site-install-folder, click Move to Trash button to remove it. Then you will encounter below error message.
    The operation can’t be completed because some items had to be skipped. For each item, choose File > Get Info, make sure “Locked” is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again.
  3. Correct Action: Open the XAMPP server on macOS, then click the General tab —> Open Terminal button to open a terminal window.
  4. Then this will let you input command in the embedded Linux server ( XAMPP server in running in the embedded Linux server ).
    Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
  5. Run the below command in the Linux server then you can remove the WordPress folder entirely.
    root@debian:~# cd /opt/lampp/
    
    root@debian:/opt/lampp# cd htdocs/
    
    root@debian:/opt/lampp/htdocs# ls -l
    total 60
    -rw-r--r--  1 bitnami root     3607 Feb 27  2017 applications.html
    -rw-r--r--  1 bitnami root      177 Feb 27  2017 bitnami.css
    drwxrwxrwx  3 bitnami bitnami  4096 Dec  3 11:37 code-learner
    drwxrwxr-x 20 bitnami bitnami  4096 May 10  2018 dashboard
    -rw-r--r--  1 bitnami root    30894 May 11  2007 favicon.ico
    drwxr-xr-x  2 bitnami root     4096 Jul 22  2019 img
    -rw-r--r--  1 bitnami root      260 Jul  9  2015 index.php
    drwxrwxr-x  2 bitnami daemon   4096 Jul 22  2019 webalizer
    
    root@debian:/opt/lampp/htdocs# rm -rf code-learner/
    
    root@debian:/opt/lampp/htdocs# ls -al
    total 64
    drwxr-xr-x  5 bitnami root     4096 Dec  3 14:34 .
    drwxr-xr-x 25 root    root     4096 Jul 22  2019 ..
    -rw-r--r--  1 bitnami root     3607 Feb 27  2017 applications.html
    -rw-r--r--  1 bitnami root      177 Feb 27  2017 bitnami.css
    drwxrwxr-x 20 bitnami bitnami  4096 May 10  2018 dashboard
    -rw-r--r--  1 bitnami root    30894 May 11  2007 favicon.ico
    drwxr-xr-x  2 bitnami root     4096 Jul 22  2019 img
    -rw-r--r--  1 bitnami root      260 Jul  9  2015 index.php
    drwxrwxr-x  2 bitnami daemon   4096 Jul 22  2019 webalizer
    root@debian:/opt/lampp/htdocs# 
    

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.