• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
LLODO – News – Tech and Education

LLODO - News - Tech and Education

Breaking News, Latest News about education, Technoly

  • News Tech
  • World News
  • Education
  • Science
You are here: Home / Technology / Students Tutorial – Allow WordPress Permalinks on Nginx or Apache2

Students Tutorial – Allow WordPress Permalinks on Nginx or Apache2

05/21/2019 by admin

Installing WordPress is not all to it. For WordPress to function properly, one must make sure all the correct settings are in place. This brief tutorial shows you how to correctly configure Nginx or Apache2 webservers to allow WordPress permalinks.

On this site, we’ve written many detailed tutorials on installing WordPress on Nginx and Apache2. Many of our tutorials written are done so that new students and users don’t experience issues after setting things up.

To read a previous post on installing WordPress, please search our site. There are many well written posts that will help you do that.

Step 1: Setting up Apache2 to allow WordPress Permalinks

To setup Apache2 to allow WordPress Permalinks you first need to enable Apache2 rewrite module. This can be done by running the commands below

sudo a2enmod rewrite

Then restart Apache2 server by running the commands below

sudo systemctl restart apache2.service

After restarting Apache2, go and add the below directory block into Apache2 VirtualHost file for WordPress. On Ubuntu the default file is at

sudo nano /etc/apache2/sites-available/000-default.conf

The the block below and save the file.

Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
 Directory>

The change your changes and restart Apache2

 

Step 2: Setting up Nginx to allow WordPress Permalinks

The steps above showed you how to do it with Apache2. The ones below show you how to do it with Nginx.

The good thing about Nginx is it’s usually built with its rewrite module enabled so you don’t need to first enable it. All you have to do it add a single rewrite line into the site configuration file and you’re done.

Open WordPress site configuration file, usually at the path below

sudo nano /etc/nginx/sites-available/default.conf

The add the line below to enable rewrite for WordPress permalinks

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;

Save your changes and and restart Nginx webserver and you’re done.

sudo systemctl restart nginx.service

These are the steps the correctly configure Apache2 or Nginx webservers to allow WordPress permalinks.

Enjoy!

 

Related posts:

  1. Redirect HTTP to HTTPS using Nginx or Apache2 on Ubuntu 17.04
  2. Apache2 301 Redirect Without htaccess File on Ubuntu 17.04
  3. Setup Varnish and Apache2 on Ubuntu 17.04 / 17.10
  4. Setup Apache2 Virtual Hosting on Ubuntu 17.04 / 17.10
  5. Install WordPress on Ubuntu 17.04 / 17.10 with Apache2 HTTP/2 and Let’s Encrypt SSL
  6. Running Multiple WordPress Sites on Ubuntu 16.04 LTS with Apache2, MariaDB and PHP 7.1 Support
  7. Install Ghost CMS on Ubuntu 16.04 / 17.10 / 18.04 with MariaDB and Apache2 Proxy
  8. Install the Latest Apache2 HTTP Server ( 2.4.34 ) on Ubuntu 16.04 / 17.10 / 18.04 LTS Servers
  9. Apache2 HTTP Server ( 2.4.35 ) Released — Here’s How to Install / Upgrade on Ubuntu 16.04 / 18.04 LTS

Filed Under: Technology Tagged With: Apache2

Primary Sidebar

Featured Posts

[LLODO] Surveillance video shows woman jumping into frozen pool to save dog

02/25/2021

[LLODO] 2 Boston construction workers found dead in hole, authorities say

02/25/2021

[LLODO] ‘He is one of the uncounted,’ says daughter of Marine vet who died after contracting COVID in NY nursing home

02/25/2021

[LLODO] Cuomo aide denies Lindsey Boylan claim governor asked her to play ‘strip poker’ during 2017 flight

02/25/2021

[LLODO] ‘How the mighty have fallen’: Geraldo Rivera, Deroy Murdock rail against scandal-ridden Andrew Cuomo

02/25/2021

Categories

  • Applications (750)
  • Business (6,322)
  • Education (2,405)
  • Health (4,182)
  • Iphone (2,005)
  • News Tech (11,649)
  • Reviews (6,041)
  • Science (1,429)
  • Technology (13,615)
  • World News (289)

Home - About Us - Privacy Policy - Contact Us - Site map
Copyright © 2021 · LLODO.COM - Internet Do - QA Do Eng