Questions regarding a migrate

November 7, 2015 452 views
WordPress Getting Started Ubuntu

Hey DO,

Stoked to finally be doing my own hosting, however i've run in to a few issues.
I have a droplet with nginx installed. I have a site that I am trying to migrate over (have all the files and database ready to go). I followed the getting started tutorials, including have my SSH setup, with daemon configured.

  1. The issue that I'm having is that when trying to add my zip file of my site to domain/htdocs via ftp (coda) I get a permissions error. Now I read I only have access to my user files. So what is the proper or better way of doing this? Ive looked and can't find any info.

  2. I'm trying to upload my new database (which i have inserted via ftp to my /home/userfolder) using this command : mysql -u (user) -p DB < newDB

    i get this error
    ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)
    as you may have guessed all of my passwords do not work

I feel like if I could log back into root access I wouldn't be having this issue, but I've disabled root access as a security precaution. Am I missing something or did I just screw this up? Any help would be greatly appreciated.
Thank you guys keep up the good work!

1 Answer

To unzip the files you need to have root Access (Directory is owned by www-data)

  • sudo unzip /target/ (/var/www/html)

You need to create a new MySQL user

  • sudo su
  • mysql -p DB
  • GRANT SELECT ON DB.* TO 'user'@'' IDENTIFIED BY 'userpasswd';
  • exit
  • exit

If it does not work, just ask !!!

Have another answer? Share your knowledge.