Getting a tar file into a wp installation

by 2 replies
3
Update - think I've figured it out! I just had to dig out and unzip the single folder on my desktop containing the site, didn't need the entire tar.gz file.

Hello,
Someone asked me to transfer a wp site to a new host, and gave me a zipped tar file from his old hosting company. I uploaded it to cpanel (it took 8 hours!) and extracted the contents into public_html. I'm now left with a load of files showing under the domain.

The entire site, including the index.php, seems to be contained within a file called homedir.tar, a POSIX tar archive. But when I try to extract the contents, it creates a new public_html folder. So I end up with public_html_public_html/domain. And the homedir file is empty. So no site

Stuck on what to do next. Hoping someone can help!

Thank you,
Lynn
#programming #file #installation #tar
  • You can unpack into a tmp directory (make one special for this) then move the files with 'mv'

    mkdir tmp
    cd tmp
    tar -xf ../myTarFile.tar.gz
    mv public_html/* ..

    You may have to adjust the above for your circumstances.

    Harrison
    • [ 1 ] Thanks
    • [1] reply
    • Hi,

      Yes, you need to log into the new server where you are extracting the tar.gz file and issue the following commands. Assuming your main root directory for your html files is public_html, do the following:

      cd public_html
      mkdir temp
      cp whatever.tar.gz temp/
      cd temp
      tar xzvf whatever.tar.gz
      mv * ../.

      That should extract everything from the tar.gz file into the temp directory and then you are moving everything in the temp directory to public_html.

      - Max
      • [ 1 ] Thanks

Next Topics on Trending Feed