By ic891
I have a droplet running Ubuntu 18.04.
I followed this guide (https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04)
I made sure to complete all the prerequisite steps, ensuring that I didn’t make any typos and followed every step.
Everything seemed to go smoothly until the absolute last step where you log in to Wordpress via the domain. Rather than getting the wordpress login, I’m still getting the “Welcome to Nginx” text page.
I’ve tried searching and some people say this is due to the index.html file, but I don’t even know where to begin to find the source of the issue.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @ic891,
There are a few things which could be causing this:
/etc/nginx/sites-enabled/default then you just need to run this command in order to delete the index file:- sudo rm /var/www/html/index.html
This would delete the default Nginx index file.
sites-available folder to your sites-enabled folder, to check that run this command here:- sudo ls -l /etc/nginx/sites-enabled/
If you do not see your new server block in there, you can run this command here:
sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/
After run a config test:
- sudo nginx -t
If no errors were reported, reload Nginx by typing:
- sudo systemctl reload nginx
You need to make sure that Nginx can access your WordPress files, to do that you need to run this command:
- sudo chown -R www-data:www-data /var/www/wordpress
Let me know how it goes!
If this still does not help please run the following commands and share the output here:
- sudo ls -l /etc/nginx/sites-enabled/
Then run:
- sudo /etc/nginx/sites-enabled/ -print -exec cat {} \;
Hope that this helps! Regards, Bobby
Hi @ic891,
I am sure you made an error while doing configuration, Follow this carefully to solve this.
First Unlink the default Nginx configuration, if you not done yet.
sudo unlink /etc/nginx/sites-enabled/default
Next, create a configuration file for your website:
sudo nano /etc/nginx/sites-available/domain.com
Add the following configuration:
server {
listen 80;
root /var/www/public_html;
index index.php index.html index.htm index.nginx-debian.html;
server_name yourdomain.com;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
Enable configuration for a new website:
sudo ln -s /etc/nginx/sites-available /etc/nginx/sites-enabled
sudo systecmctl reload nginx
Once you have done this, Install PHP-fpm to process the PHP files, Nginx will not process the PHP files.
sudo apt install PHP-fpm
Install WordPress in your public_html directory and then you can use your website.
If you still have any problem, Let me know.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.