Permalink not working after move to digital ocean of my wordpress site

September 20, 2016 2.4k views
WordPress Apache Ubuntu

hello friends...

Recently I moved my wordpress site to Digital Ocean, I setup-ed SSL in my site. Now the problem here was. My wordpress site permalink was not working. I charged the url structure on wordpress. But nothing changed.

Please help me out to get out from this problem.

  • You didn't provide much to go on, sharing a bit more information will let us help you troubleshoot this issue:

    What exactly is not working?

    What is happening when you browse to different pages?

    Can you share any URLs that show this?

    Did you use our WordPress one-click image or set it up yourself?

  • My site address was

    Visit any of the page inside the website, It will say "Page Not found" Error.

    I changed the wordpress URL settings... also edited the apache 80 port file... Nothing helped me.

    I added this

    <Directory /var/www/html>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all

    I added the above code to the following file.


    I hope you got , What my problem really was now.

4 Answers

Thanks to all your effort to answer my question. The problem was with my domain. The step is different for SSL Enabled domain. I got answer from Enable mod_rewrite in apache2 SSL Enabled Domain

Thanks again

You should have correct .htaccess in location of WordPress's index.php file. This is in place where you installed WordPress, usually /var/www/html.

Open .htaccess file in your favourite text editor:

  • nano /var/www/html/.htaccess

Make sure it have following:

# 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]
# END WordPress

Optional: Just in case to be sure it will use latest changes restart Apache with:

  • sudo systemctl restart apache

In case anyone came looking for an answer to "Ubuntu 16.04 One-click Wordpress install" permalinks not working, the solution for me was to enable mod_rewrite using:

sudo a2enmod rewrite
sudo service apache2 restart

Hope this helps

im also facing same issue, after applying above steps also its not working

Have another answer? Share your knowledge.