Setting up website from scratch

Setting up a wordpress site on your own server. Follow the instructions. 😀

  1. purchase a domain (namecheap)
  2. Generate your ssh keys for later when you are required to add your public key in digital ocean and to ssh into your server. https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54
    • cd to your ssh folder  ~/.sshto generate the keys directly there
  3. setup a server (digital ocean)
    • Create a droplet – Ubuntu 18.04.2, Standard, cheapest@$5/month
    • Add a domain (which you’ve purchased) enter example.com and create a new type `A` record. This will generate name servers which you can then add back in namecheap.com
  4. in Namecheap.com, navigate to the domain above and select manage
    • Under nameservers tab, select CustomDNS and add all the `NS` value generated by digital ocean
  5. You need to update your nameservers with your domain registrar for the records below to take effect.
  6. set your nameservers to point to your custom dns (digital ocean)
  7. Now ssh into your server! ssh root@example.comor ssh -i ~/.ssh/nameoffile root@example.com
  8. In your server follow the instructions for mariadb and php. https://websiteforstudents.com/install-wordpress-on-ubuntu-18-04-lts-bata-with-nginx-mariadb-and-php-fpm/
  9. a note with chown -R www-data:www-data /var/www/html sets permissions for the default web root, so the files are owned by the user account used by your web server. WordPress will ask for these FTP credentials if it detects that it does not have permission to write the needed files itself.
  10. Emphasing password for root user on login https://serverfault.com/questions/795290/admin-password-of-mariadb-doesnt-seem-to-work
  11. https://www.nginx.com/blog/installing-wordpress-with-nginx-unit/
  12. unlink /etc/nginx/sites-enabled/default
  13. At this point nginx conf is not yet complete, so let’s head to letsencrypt https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04

.

.

.

.

.

Took me 2 years to understand what I’m doing, but I could still be wrong. Hah.

Leave a comment

Your email address will not be published. Required fields are marked *