0

I deployed My Wordpress Blog in one of my subdomains in Digital Ocean. I am running apache2 as my webserver.

When I am trying to change my permalink settings to settings other than plain(Only plain setting is working), I am getting 404 Page

404 page

Can anyone help to fix this problem?

I tried activating mods)_rewrite module - apache and tried to create new .htaccess file in the wordpress root folder.

.htaccess file related to my WordPress installation:

  # BEGIN WordPress
  <IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  </IfModule>

# END WordPress Virtual host file related to Wordpress Site:


<VirtualHost *:80>
    ServerName blog.gopibabu.live
    ServerAlias www.blog.gopibabu.live

    DocumentRoot /var/www/MyBlog

        <Directory /var/www/MyBlog>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Require all granted
        </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =blog.gopibabu.live [OR]
    RewriteCond %{SERVER_NAME} =www.blog.gopibabu.live
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

I need my permalinks to work in my WordPress installation !!!

2
  • I would start by asking if you are using wordpress default twenty* themes? or a custom theme? Sometimes custom themes have CPT or related slug changes that cause issue. if you are using custom theme, please switch to the base theme and see if that works? – Wali Hassan Aug 27 '19 at 19:59
  • Switching to Default Theme didn't fix the issue with permalinks!! – Gopibabu Aug 28 '19 at 22:50
0

This fixed my issue with permalinks :

https://www.youtube.com/watch?v=YaL72Ho_Fr8

NOTE: In my case, I edited the virtual hosts files for both HTTP and HTTPS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.