Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unable to copy contents of Wordpress directory to root

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
geekyfreaky
Posts: 2
Joined: 2018-12-14 17:30

Unable to copy contents of Wordpress directory to root

#1 Post by geekyfreaky »

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-lin ... amp-stack/

I am now at this step:

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

Code: Select all

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:

Code: Select all

root@debianlinux:/home/lanalee# cp -a ~/wordpress/* /var/www/html
cp: cannot stat '/root/wordpress*': No such file or directory
Someone please help me!!! Thank you so much.

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Unable to copy contents of Wordpress directory to root

#2 Post by 4D696B65 »

geekyfreaky wrote: I am following the instructions at this link to install WordPress: https://www.adminbyaccident.com/gnu-lin ... amp-stack/
Any reason you don't use the debian way?
https://wiki.debian.org/WordPress

geekyfreaky
Posts: 2
Joined: 2018-12-14 17:30

Re: Unable to copy contents of Wordpress directory to root

#3 Post by geekyfreaky »

4D696B65 wrote:
geekyfreaky wrote: I am following the instructions at this link to install WordPress: https://www.adminbyaccident.com/gnu-lin ... amp-stack/
Any reason you don't use the debian way?
https://wiki.debian.org/WordPress
Used that link as a recommendation from an IT person I know.
Any ideas on how to proceed?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Unable to copy contents of Wordpress directory to root

#4 Post by bw123 »

means file is not present at path you told cp to find it at.
https://duckduckgo.com/html/?q=cp+cannot+stat

nobody knows were you untarred it to, try this
https://duckduckgo.com/html/?q=linux+cli+find
Last edited by bw123 on 2018-12-14 18:44, edited 1 time in total.
resigned by AI ChatGPT

Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Unable to copy contents of Wordpress directory to root

#5 Post by Bulkley »

geekyfreaky wrote:Any ideas on how to proceed?
Go to the link that 4D696B65 gave you. Start at step 1, Packages Installation and follow directions.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Unable to copy contents of Wordpress directory to root

#6 Post by GarryRicketson »

Agreed, it would be better to follow the link to the debian wiki, ...
It looks to me , some how when you login as root, you switch to root's home:
/root
cp: cannot stat '/root/wordpress*': No such file or directory
You must be in the directory where the file is, or have the right path to it, in the cp command.
You can verify what directory you are actually in with the 'pwd' command.
'man pwd' for details. It also might be to your advantage to look at 'man cp ' as well,
example:

Code: Select all

garry% ksh
garry$ pwd
/home/garry
garry$ login root
Password:
garry# pwd
/root
garry# 
 
As you can see when I logged in as root, it changes to root's home dir. How did you get root access, if you can not use sudo ? Normally using 'su', would not change directories, but that has changed on Debian, now you need to use 'su - ' ..In any event, it is all ways good to check what dir you are in, that is what 'pwd' is for.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Unable to copy contents of Wordpress directory to root

#7 Post by Segfault »

Code: Select all

root@debianlinux:/home/lanalee# cp -a ~/wordpress/* /var/www/html
Well, as seen here the files are in /home/lanalee, but the command as used will look for them in /root/wordpress/. That's incorrect use of '~'.

Post Reply