Search code examples
linuxwordpressdebianlamp

Cannot copy contents of Wordpress directory to the web server root


I'm a total newbie at this! I have a virtual machine running Debian 9. I have LAMP installed. I am following the instructions at this link to install WordPress: https://www.adminbyaccident.com/gnu-linux/how-to-install-wordpress-on-debian-9-lamp-stack/

I am now at this step:

We now copy the contents of the wordpress directory to the web server root.

albert@debian:~/wordpress$ sudo cp -a ~/wordpress/* /var/www/html
[sudo] password for albert:
albert@debian:~/wordpress$

However, when I try this (I don't use "sudo" because it's not installed on Debian by default), I get the following error message:

enter image description here Someone please help me!!! Thank you so much.


Solution

  • It looks like the wordpress directory is not in the root directory. Did you cd somewhere after downloading? If not, the wordpress dir should be at your current dir which is /home/lanalee/. Type in ls to list all files in /home/lanalee/. If the list shows a directory named wordpress, you can continue with the following command:

    cp -a ./wordpress/* /var/www/html
    

    I replaced the ~ which points to your systems root directory with a . that refers to the folder your currently in.

    If there is no wordpress directory listed, please type ls ~/ and share the output with us.