最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

permalinks - After server migration only the homepage works

programmeradmin5浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论