Hello, I have been having an issue with my WordPress site that I have just migrated from a local server. The homepage and the admin pages work, but none of the other pages work. they all return a 404 not found error. I have checked that the permalinks are properly set up. I can edit the pages, and it displays the proper permalinks on the admin side. This is my htaccess file
# 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
is there anything wrong here? I’ve enabled mod_rewrite in apache. Any suggestions are greatly appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
From the CLI, please run:
tail -20 /var/log/apache2/error.log
Once you execute that command, copy and paste the output to a code block as you did with your .htaccess file. We can then take a closer look to see if there’s anything being logged that’ll help us to find the cause of the issue.
<IfModule mod_rewrite.c>
Please make sure your mod rewrite is enabled and that you allow override in the vhost for the site.
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.