Why can't change nginx port from 8080 into 80 for the wordpress?

The wordpress is been built on nginx ,the port is 8080 ,it can be visited at the form of

In my wordpress database:

select guid  from wp_posts limit 2 ;
| guid                          |
| |
| |

Now i want to change the port of nginx from 8080 into 80.

1.edit /etc/nginx/nginx.conf from

server {
    listen 8080;
    server_name localhost;

#irrelated  content omitted 


server {
    listen 80;
    server_name localhost;

2.edit /var/www/html/wp/wp-config.php





3.login into my wordpress database to execute the sql commands.

UPDATE wp_posts SET post_content = replace(post_content, '', ''); 
UPDATE wp_options SET option_value = replace(option_value, '', ''); 
UPDATE wp_posts SET guid = replace(guid, '', ''); 
UPDATE wp_posts SET pinged = replace(pinged, '', ''); 
update wp_options set option_value='http://localhost:80' where option_name='siteurl';
update wp_options set option_value='http://localhost:80' where option_name='home';

Now restart ngix.

service nginx restart

when i input in the browser.

Where the problem appear?

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.

I would suggest looking your error logs to see the problem, also if your site is running on port 80 you do not need to put :80 to access your site, it will default to 80.