"Welcome to Nginx!" After following Ubuntu 18.04 Wordpress Installation guide

I have a droplet running Ubuntu 18.04.

I followed this guide (

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.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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/

Add the following configuration:

server {
        listen 80;
        root /var/www/public_html;
        index index.php index.html index.htm index.nginx-debian.html;

        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.

Hi there @ic891,

There are a few things which could be causing this:

  • If you used the configuration file at /etc/nginx/sites-enabled/default then you just need to run this command in order to delete the index file:
  1. sudo rm /var/www/html/index.html

This would delete the default Nginx index file.

  • If you created a new server block, you need to make sure that the configuration file has a symlink from your sites-available folder to your sites-enabled folder, to check that run this command here:
  1. 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:

  1. sudo nginx -t

If no errors were reported, reload Nginx by typing:

  1. 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:

  1. 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:

  1. sudo ls -l /etc/nginx/sites-enabled/

Then run:

  1. sudo /etc/nginx/sites-enabled/ -print -exec cat {} \;

Hope that this helps! Regards, Bobby