/public_html/’ is not a directory

Hello,

First, Thank you guys again for ALL of your help.

I'm on my last little leg of installation and for some reason I cannot get this one part to work correctly.

I am trying to transfer my wordpress files to publichtml but for some reason it says the directory does not exist. Although I obviously know I created the directory, when I check to see that publichtml exists it does but the files still won't copy over.

Here is what I've been using

sudo cp -R wordpress/* ../public_html/

And I get this in return: cp: target ‘…/public_html/’ is not a directory

:?

4 Replies

Are both of the directories on the same level?

> ls
    public_html    wordpress

If so the ../ is not necessary. ../goes up a level which would be effective if your structure was something like

public_html    xtrafolder
                         |-wordpress

@jeremye77:

Are both of the directories on the same level?

> ls
    public_html    wordpress

If so the ../ is not necessary. ../goes up a level which would be effective if your structure was something like

public_html    xtrafolder
                         |-wordpress

I'm honestly not very sure as this is something completely new to me. Last year, I setup my Linode without any issues but this year it seems like the instructions on the Linode website are outdated for installing wordpress. I literally just followed these exact instructions and can't get past the last part of it:

Install WordPress

Create an src directory under your website’s directory to store pristine copies of WordPress’s source files. In this guide, the home directory /var/www/exmaple.com/ is used as an example. Navigate to that new directory:

sudo mkdir /var/www/example.com/src/

cd /var/www/example.com/src/

sudo chown -R www-data:www-data /var/www/

Install the latest version of WordPress and expand it:

sudo wget http://wordpress.org/latest.tar.gz

sudo -u www-data tar -xvf latest.tar.gz

Move latest.tar.gz, so it is renamed as wordpress, followed by the date to store a pristine backup of the source files:

sudo mv latest.tar.gz wordpress-date "+%Y-%m-%d".tar.gz

Copy the WordPress files to your public_html folder, then remove the folder in the src directory:

sudo cp -R wordpress/* ../public_html/

sudo rm -rf wordpress/

if wordpress is located in /src/wordpres and public_html is above src you may need another ../

../../public_html/

You can test by going into the directory where wordpress is located and type cd ../../ if doing that takes you to the folder that contains public_html that is the neccesary step. If you try cd ../ my guess, based on the information provided, is that you end up in src.

If this is driving you up a wall just use full paths Example cp -R /home/www/src/wordpress/* /home/www/public_html/

You can determine your current path with the command: pwd

OPTIONAL THOUGHT

Which is one way to do it. You could also you change your vhost to point to the wordpress directory and save the file you downloaded if you want a pristine copy.

An example: my vhost points to /home/me/www/public_html/the-cms-i-use-which-could-be-wordpress/

Okay so first I want to say thank you so much for all of your help! It has really lead me to the right direction. There was a couple of things that I learned.

1) Although I used this line sudo mkdir -p /var/www/example.com/publichtml to create a directory for public html – it did not place it where it needs to be and /var/www/example.com/publichtml/ never existed which is why it said directory doesn't exist.

2) I created /var/www/example.com/publichtml/ then transferred wordpress from SRC to newly created publichtml folder. It didnt give me an error or "couldnt find directory" -- it just flat out DIDNT transfer.

3) So then I got impatient and installed wordpress directly into /var/www/example.com/publichtml/ and it still didnt work. I'm so confused because I am used to wordpress being under /home/publichtml/domainname/wordpress/ …but none of that exists either presumably bc theyre not subdomains?

4) Most likely all of the instructions on Linode's Get Started / Installing Wordpress are extremely outdated.

5) I may just have to give up and try to install wordpress via FTP upload.

6) The real killer: Im not even sure this is the right Public html (/var/www/example.com/public_html) because I believe if it were then at the very least i should see a wordpress folder in my index. :twisted:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct