permalinks - After server migration only the homepage works

I have recently changed hosting of my WordPress site to VPS. I have moved all of my files and imported the database. Eve

I have recently changed hosting of my WordPress site to VPS. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of my pages are bringing back a 404 except the homepage.

Site URL is

I have recently changed hosting of my WordPress site to VPS. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of my pages are bringing back a 404 except the homepage.

Site URL is http://inksquared

Share Improve this question edited Feb 21, 2012 at 15:41 Scott 12.3k15 gold badges68 silver badges99 bronze badges asked Apr 13, 2011 at 18:32 mikeyrocksmikeyrocks 5231 gold badge4 silver badges6 bronze badges 2
  • I had this problem today! Migrated WordPress Site – Homepage Works, All Other Pages/Links Fail – user187724 Commented Jan 9, 2016 at 19:22
  • I had same issue and then it is fixed by changing .htaccess file according to default values from here wordpress/support/article/htaccess – Muzaffar Mahmood Commented Jun 23, 2020 at 8:38
Add a comment  | 

6 Answers 6

Reset to default 54

I guess you get http://yoursite but not http://yoursite/anything

I had a similar problem and it worked when I changed

the httpd.conf from

AllowOverride None

to

AllowOverride All

It makes the .htaccess take effect.

Try flushing your mod_rewrite rules:

Dashboard -> Settings -> Permalinks

Save settings (no need to make any changes)

I had faced the same problem.

I did the following to resolve it on an Ubuntu Server:

  1. In /etc/apache2/apache2.conf, edit AllowOverride None for /var/www/ to AllowOverride All

  2. Type in the following command to enable mod_rewrite for .htaccess

sudo a2enmod rewrite

  1. Restart your apache server:

sudo service apache2 restart

The problem solved!!!

In Ubuntu 14.04 - the 000-default.conf file can be found here /etc/apache2/sites-available

Or if you run multiple wp the virtual host setting would be your config file name. e.g. domain.conf

You have to replace AllowOverride None to AllowOverride All

Hope this will work.

The reason is most likely that the .htaccess file wasn't copied over. On Mac OS X, and in some FTP applications, this file is considered "hidden" because it starts with a .. If you go to the Settings -> Permalinks section in your admin section, you can regenerate this file, but it's probably best to find the version you had previously and use that again (especially if you use a caching plugin).

Do you get a web server 404 or a WordPress 404? If it's a web server 404, you most likely didn't copy the root htaccess file over from the old installation, or it doesn't have correct permissions to run.

My first troubleshooting item would be to check and see if an htaccess file exists in the root. And if so, what it contains.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742255324a4409916.html

相关推荐

  • permalinks - After server migration only the homepage works

    I have recently changed hosting of my WordPress site to VPS. I have moved all of my files and imported the database. Eve

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信