Support » Fixing WordPress » Permalinks not working after moving WordPress

  • I’m having trouble with my permalinks. I moved a wordpress site from my local server to a subdirectory called “test” on a remote host (servage.net) and every thing is working fine in terms of connecting to the database I imported, logging into wp-admin and viewing home page, but I get a 404 Not Found page/message when I click on the navigation links. I followed advice on many posts I have seen in the forums here by 1) resetting the permalinks back to “default”, in which case they work fine. But when I reset the permalinks back to the setting I had before (custom: /%postname%/) they still don’t work.

    I have also read in these forums that the .htaccess file may be the issue??? here is the content of my htaccess file if this helps:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /test/index.php [L]
    </IfModule>

    # END WordPress

    Thanks for any advice!

Viewing 9 replies - 1 through 9 (of 9 total)
  • completely delete the .htaccess file
    then set and save your custom permalinks again, letting wordpress generate new rewrite rules

    Thanks samboll. I did what you recommended but it’s still not working (I checked the .htaccess file, and the content is the same). Any other options?

    a link to site?

    Here’s a link to the site with the permalinks set to “default” (so the navigation links work)…

    http://www.lamag.org/test/

    I would like to get this resolved before moving these files into the root directory (and replacing the current static site). Do you think I should start over by reinstalling a fresh version of wordpress into the “test” directory and then changing the usual things like wp-config and wp-content, etc.

    Thx!

    don’t understand why it’s not working on a ‘nix server
    maybe try adding this to top of .htaccess before wordpress stuff before you install again

    Options +FollowSymLinks

    I’m also having problems with my Permalinks after moving a local site to a remote server. The problem, I think, has to do with the way my server host handles URLs. The actual files (it’s a test blog for a client, which I’ve put inside my own domain) are at:
    http://www.rhcvisualwriting.com/html/clients/jt/
    but the URL is:
    http://www.rhcvisualwriting.com/clients/jt/
    The server host drops the /html/ for urls.

    When the Permalinks setting is at default (which WP sees as:
    http://www.rhcvisualwriting.com/html/clients/jt/?p=123)
    the homepage works correctly, but links to pages and posts generate 404s. If I create a custom Permalink setting that drops the /html/ out of the URL, then the homepage is a 404 too.
    Though I’ve set the permissions in my htaccess file to allow group read/write, WordPress still thinks it doesn’t have permission–when I try to do a custom Permalink, it tells me it can’t write in the file, so to paste the code below.

    http://www.rhcvisualwriting.com/html/clients/jt/?p=123
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /html/clients/jt/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /html/clients/jt/index.php [L]
    </IfModule>

    Because of the /html/ directory problem, I’m not sure WP is even generating the right code. So I tried changing the rewrite rule to
    RewriteRule . /clients/jt/index.php [L]
    Didn’t make any difference.

    Is there a clue in the fact that on the Permalinks Settings page, there are these two error messages:

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h05/mnt/33146/domains/rhcvisualwriting.com/html/clients/jt/wp-admin/options-permalink.php on line 141

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h05/mnt/33146/domains/rhcvisualwriting.com/html/clients/jt/wp-admin/includes/misc.php on line 133

    I looked at those files/lines, and they refer to user permissions.

    Any help will be greatly appreciated!
    Thanks

    I am also having the same issue as the OP.
    I’ve tried having the same .htaccess file – I even tried adding in

    Options +FollowSymLinks

    to no avail. As well, I tried to see if I was having the dropped folder issue beccaC mentioned, but everything I changed it to seemed to still result in the site’s inability to run with custom permalinks.

    Is there anything someone could think of that would make this not run? I’m on an Apache server. I have another site on there that has never given me issues with a mod rewrite, so I know it’s activated. I checked the other site’s rewrite code & even used that to create the WordPress one to no avail.

    Could there be something I left unchanged in the database import that would cause this? I’m at wit’s end.

    Check if the mod_rewrite extension is loaded on your server.

    mod_rewrite extension is indeed loaded on the server, as it works on other sites that exist on the server.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Permalinks not working after moving WordPress’ is closed to new replies.