A few days ago I tried transferring my wordpress
website from shared hosting to vps
but I've run into a problem.
After following many guides/tutorials and googling myself I can't figure out why it's not working. The homepage is the only page that loads all other pages 404. I've included some relevant files.
Does anyone have any ideas?
HTACCESS
httpd.conf
Partial directory listing - www.pastebin.com/BCPfRisB
Thanks in advance
A WordPress migration with the Migrator plugin does not take more than 24 hours. In most cases, it is completed within a few hours. This is valid for the cases in which there are no technical issues that might interfere with the migration.
Your site's secondary page would work now.
I too have the same issue, fixed it creating .htaccess in the root directory with following content:
/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
Along with editing httpd.conf
placed in /etc/httpd/conf
to set value of AllowOverride directive to All
for the /var/www/html
directory, as below:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
And finally restarting apache:
sudo service httpd restart
For all the steps related to deployment you can find here - Hosting WordPress Application on Centos Box.
I posted this answer because I didn't find an answer which offered all possible solutions. Consider this answer as a pleasant checklist which should help you to fix this issue.
a) Permalinks update. The following steps rebuild the internal settings.
a) Login to your WordPress dashboard.
b) Go to Settings -> Permalinks.
c) Don't make any changes, just click "Save Changes" button.
b) .htaccess
needs the settings for the rewrite engine:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
c) Also, due to an error in the Apache log file the following entry was needed as well in the your-wordpress.conf
Apache file which is mostly in the /etc/apache2/vhostd.d
directory.
<Directory your-wordpress-directory>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
d) Assure mod_rewrite
is enabled
a2enmod rewrite
Restart Apache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With