WordPress installation is from hell.. Nginx hates me and the EE quick code isn't working


#1

donovan@donovan-XPS-13-9360:/tmp$ sudo systemctl restart nginx.service
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.
donovan@donovan-XPS-13-9360:/tmp$ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-01-28 05:57:48 EST; 28s ago
Docs: man:nginx(8)
Process: 30505 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jan 28 05:57:48 donovan-XPS-13-9360 systemd[1]: Starting A high performance web server and a reverse proxy server…
Jan 28 05:57:48 donovan-XPS-13-9360 nginx[30505]: nginx: [emerg] open() “/etc/nginx/sites-enabled/wordpress” failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
Jan 28 05:57:48 donovan-XPS-13-9360 nginx[30505]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 28 05:57:48 donovan-XPS-13-9360 systemd[1]: nginx.service: Control process exited, code=exited status=1
Jan 28 05:57:48 donovan-XPS-13-9360 systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jan 28 05:57:48 donovan-XPS-13-9360 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Hello, I am trying to install WordPress on Ubuntu 18.04. I am so close! I ran into this error and cannot find anything online to solve this problem. A beautiful soul told me about this site and I tried the quick download.
donovan@donovan-XPS-13-9360:/tmp$ sudo ee site create example.com --type=wp
sudo: ee: command not found
I keep running into this error. Any advice?


#2

Hey, first you should uninstall nginx from your server before moving on to ee. I am not exactly sure what method you used to install it, but this should remove nginx and everything else that came with it. Did you also install PHP or anything else? If you’re on a cloud host, if it’s easy for you to just terminate the server and boot up a new one I would do that. But if it isn’t and you want to keep the server you’re running, you need to remove nginx and install ee.

Stop the nginx service first; sudo service nginx stop. Then purge nginx and everything it installed with it from your system: sudo apt-get purge nginx nginx-common

ee: command not found indicates that you haven’t installed EasyEngine yet. To install EasyEngine, after you’ve removed everything that you’ve previously installed, cd your home directory: cd ~ and now you install ee with the following command: sudo wget -qO ee rt.cx/ee4 && sudo bash ee

Now you can create your site, which would be as you said above sudo ee site create example.com --type=wp I’d recommend installing the caching system with your site as well, because at the moment the ee site update function doesn’t allow you to add the caching system after a site has been created, it will soon though with a future update.

So as an example, this command would create your WP website with caching & SSL: sudo ee site create example.com --type=wp --cache --ssl=le If you want to specify your own admin email and admin username, you would use the flags --admin-email=youremail@yourdomain.com --admin-user=theusernameyouwant you can also specify your own password with --admin-pass=yourpassword but I’d let EE take care of that for you unless you can create can create a strong password from the get-go, I’d say 16 characters long minimum with lower and uppercase letters, numbers and symbols. If you don’t want to specify your own password don’t worry about that part, EE will generate a strong enough password for you and you can always change it yourself when you log in to wp-admin anyway.

The default SSL option gives you certificates for domain.com and www.domain.com; but if you want to get a wildcard certificate which basically covers any subdomain (let’s say you use a CDN like CloudFlare to deliver content or whatever the case may be, then you would add the flag --wildcard after the --ssl=le flag.

And just a tip, once everything is up and running, install this plugin which will remove the query strings from your js and css files (Like if you look at your website source now, you’ll notice all the js and css files are appended with ?ver=xxx, xxx being the version number of that resource.) Files with query strings won’t be cached, so install and activate this plugin and it automatically removes all query strings for you, thus making all your css/js files cached on server.