Question

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

Posted September 20, 2016 2.7k views
UbuntuApacheWordPress

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.

2 comments
  • 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 https://www.alaneesqatar.qa

    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
        </Directory>
    

    I added the above code to the following file.

    /etc/apache2/sites-enabled/000-default.conf

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

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.

×
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:

/var/www/html/.htaccess
# 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

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

Submit an Answer