6

I just migrated my ecommerce website (www.getfitkart.com) from shared hosting to Linode. Now only the home page is working but the other pages are not getting served. I am getting the following error on all other pages like say, http://www.getfitkart.com/privacy-policy/

Not Found
The requested URL /privacy-policy/ was not found on this server.

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

Any help will be greatly appreciated.

5

I found the solution here:

https://www.digitalocean.com/community/questions/wordpress-permalinks-not-working-on-ubuntu-14-04

The thing is that we need to allow the override all option in httpd.conf (location: /etc/httpd/conf/httpd.conf) for your specific hosting directory.

4

Sometimes on a new server it's just the rewrite module missing from Apache config.

sudo a2enmod rewrite
sudo service apache2 restart
3

Go to settings->permalinks and click on save button to rewrite flush. And then empty your browser cache. It'll work hopefully.

1

Please try changing permalinks in your browser. First make it default and then you can set it to custom.

Do let me know if I was able to solve your problem.

  • 1
    I tried that but doesn't work unfortunately – Najeeb Jan 24 '17 at 5:20
  • I also created a new page after this and then tried opening it with its generated url, but that too gives a 404 error – Najeeb Jan 24 '17 at 5:22
  • Ok You mean to say that you are getting 404 with default permalinks right? If it so you please check it again by disabling all the plugins once – Pratik bhatt Jan 24 '17 at 8:24
  • I backed up all the wp files and did a fresh installation on the server, and the problem still remains with the brand new installation. – Najeeb Jan 24 '17 at 9:25
  • I am working on a Linode with CentOS, and I have ensured that I made all the changes as needed, with both file system permissions (chmod) and ownership of files (chown). Plugins are installing perfectly, but the url thingy problem is as is – Najeeb Jan 24 '17 at 9:27
0

Dear friend after moving site : go to your phone admin Then choose your database. Click on wp-option Change raw 25 to 500 Change site url : http://www.yourwebsite.com search -- path : change path of your upload

Save it Login your site: www.yoursitename.com/wp-admin Go to settings Then go to Permalink Do not change anything Just Save it.

Now try your all page.

0

Yes, I tried changing the permalinks format in Wordpress dashboard: Settings --> Permalinks

eg Mine was selected as exampledomain.com/date/postname

I changed it to exampledomain.com/postname

Now all menu links, pages, tags, category links working.

You can try different formats until it starts working, otherwise, search for other solutions.

0
<VirtualHost *:80>
    ServerName www.YOURDOMAIN.COM
    ServerAlias YOURDOMAIN.COM
    DocumentRoot /var/www/YOURDOMAIN.COM/public_html
    ErrorLog /var/www/YOURDOMAIN.COM/error.log
    CustomLog /var/www/YOURDOMAIN.COM/requests.log combined

    DocumentRoot /var/www/YOURDOMAIN.COM/public_html
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/YOURDOMAIN.COM/public_html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>


</VirtualHost>
  • Welcome to WPSE. You need to provide some context to this for it to be a valid answer; specifically a description of what you are suggesting and why it is going to solve the problem presented in the original post. – butlerblog Nov 21 '18 at 1:44

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.