The contents of a Wordpress Tarball are all contained within a single directory called "wordpress". I would like to upload the archive to my server (CentOS) and UnTar all the files directly to the root of my webserver. The problem is that everything is decompressed into the single "wordpress" directory within my document root. How can have all the contents of the "wordpress" decompressed into my document root without the "wordpress" directory? Thanks.


It would be simpler to untar everything on the destination, and let it create the wordpress folder, then copy the contents into your root. It also gives you an "untainted" copy so that if you need to you can copy the contents over again if something goes wrong.

So lets say for instance your web root is at:


And when you untar your upload, it ends up in


The command to copy it all (except hidden files would be)

cp -ax /home/user/public_html/wordpress/* /home/user/public_html/

There is very likely a .htaccess file as well, that would need a separate copy:

cp /home/user/public_html/wordpress/.htaccess /home/user/public_html/
  • I see your point. How would I copy the entire contents of the "wordpress" directory over to my root? I am afraid I am new to Linux commands. Thanks.
    – webworm
    Oct 21 '11 at 5:10
  • Do you have shell access? I have updated my answer to show how.
    – Paul
    Oct 21 '11 at 5:13
  • I do have SSH access. Thanks for a detailed answer. That should work.
    – webworm
    Oct 21 '11 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.