Getting 404 Error on every post, pages after migrating to Ubuntu 18.04


#1

I am new in Ubuntu, I was using shared host before…

I have just migrated my website on Ubuntu 18.04 it is successfully migrated and working fine. But when I try to open and post or page it is showing 404 Not Found error.

I was thinking that it was because of database but it is not becasuse if it is database problem then it will show error establishing database.

Can anyone guide me to solve this?


#2

If it is Apache, make sure .htaccess exist

Go to WordPress > re-save permalink.


#3

already did, Not working


#4

Then may be Server configuration would be wrong.

I would suggest hiring professional who can assist.

  • I am not available today.

Would recommend


#5

I will need access to server … This is probably a rewrite issue.


#6

Hey, do you use Anydesk? I am ready to give you server access


#7

Just email your server’s login credentials to bhanu@orng.co or I can give You my public key on request!

I don’t work on client systems.


#8

Can you guide me? How to fix i?


#9

You just need to check if Your mod_rewrite (in case of Apache 2) is enabled and working.
Then You need to allow overrides in the apache config.


#10

Or if it is nginx, It’s really hard to explain but you gotta check that it is properly forwarding request to php-fpm


#11

Can you please do this on my system, because I can’t provide my credentials and the second imp reason is I want to learn?


#12

Well, I kinda charge for that kind of stuff and I’m not here for free tutorials so the best that I can do for you is to ssh into it, look into the issue and fix it…

If you want me to do it on your system, you kinda have to pay me for that.


#13

are you talking about this…

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

if yes then I did it already…

How much amt will you charge for that?


#14

Well, that’s only one part. Did you restart apache afterwards?

sudo service apache2 restart ??

And You’ll have to email me for any pricing. I don’t post my rates publically.


#15
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
 </Directory>
 <Directory /var/www/html>
    Options -Indexes
 </Directory>
 ServerSignature Off
   ServerTokens Prod

And yes I restart…
This is the complete part, I hope… You can message me the charges becuase I tried to DM you but you are not accepting dm.


#16

Add the allow overrides to /var/www/html block and then restart that’ll probably fix it

Assuming that your WordPress lives in /var/www/html directory


#17

yes


#18

SSH

I aready did this but still getting same error.


#19

Something says me this is still very incorrect!

Why are you using double quotes around your directory name?

Are you editing your 000-default.conf or the apache2.conf ??


#20

I am editing 000-default.conf file

Should I remove them?