Forums

[resolved] Permalink issue after site migration to different host (25 posts)

  1. mrkingid
    Member
    Posted 1 year ago #

    Calling all guru's...

    This might be long so bare with me.

    Site: http://design-studio.com

    I started development of a new site piggy backed off a server hosted on godaddy. the install was to www.mysite.com/new-site-dev

    There I placed a fresh install of WP and started my thing. Editing the CSS, adding images and posts, etc.

    The time came to move it to its own domain but I decided not to go with godaddy.

    On the new host (netnation) i created what I needed, same DB name, etc. On the godaddy site I backed up DB, changed URL and Blog address to the new host. Installed a fresh WP and uploaded saved DB. And all was brought over and working. No pages missing, no text missing, all works well. except

    I wanted to change the permalink structure from the default to the second choice avaialable. I do that and 'boom', no pages can be accessed.

    Is the end I had to choose /index.php/%postname%/ to get semi pretty permalinks working but I would much prefer to not have the /index.php/ in the address.

    So, anyone know why I can't use the permalink structure I want too?

    I have read the codex over and over but I cannot get it to work the way I would prefer.

    Mike

    PS. Note that a fresh install and DB build (not migrating) on a netnation account allows for permalink to work the way I want.

  2. mrmist
    Member
    Posted 1 year ago #

    I do that and 'boom', no pages can be accessed

    What actually happens? "Boom" is interesting sounding but difficult to diagnose.

  3. mrkingid
    Member
    Posted 1 year ago #

    Boom=

    Access forbidden!

    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

    If you think this is a server error, please contact the webmaster.
    Error 403
    design-studio.com
    Tue Jul 15 15:24:41 2008
    Apache/2.0.54 (Debian GNU/Linux) FrontPage/5.0.2.2635 mod_ssl/2.0.54 OpenSSL/0.9.7e
    ----------
    that is the error I get when I access a page. I do not have any posts in my site.

    htaccess file reads:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

  4. mrmist
    Member
    Posted 1 year ago #

    Strange that it is only when you import your old pages.

    Maybe it is to do with the permalinks on the imported pages?

    I cannot see a reason why it should happen otherwise.

    When you bring across the old site, are you leaving the fresh install .htaccess or overwriting it?

  5. mrkingid
    Member
    Posted 1 year ago #

    when I brought over the site I left out the .htaccess as it would have been incorrect with having

    ReweriteBase / new-dev-site
    and
    RewriteRule . new-dev-site/index.php [L]

    Is permalinks help in the DB at all?

  6. mrmist
    Member
    Posted 1 year ago #

    Yes the permalink structure is maintained in the database. (wp_options)

  7. mrkingid
    Member
    Posted 1 year ago #

    I checked the DB and it says I have /%year%/%monthnum%/%day%/%postname%/ which is the one I wanted, but still nothing. Grrrrrrrrrrrr

  8. mrkingid
    Member
    Posted 1 year ago #

    Is there something wrong with my php.ini file?

    cgi.fix_pathinfo=1
    extension=curl.so
    extension=domxml.so
    extension=imap.so
    extension=mcal.so
    extension=mcrypt.so
    extension=mhash.so
    extension=mysql.so
    extension=xslt.so
    extension=gd.so

    #register_globals = off
    #allow_url_fopen = off

    #expose_php = Off
    max_execution_time = 150
    max_input_time = 60
    #variables_order = "EGPCS"
    #extension_dir = ./
    upload_tmp_dir = /tmp
    #precision = 12
    #SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

    memory_limit = 20M
    post_max_size = 8M
    file_uploads = On
    upload_max_filesize = 8M

    zend_optimizer.optimization_level=15
    zend_extension="/usr/lib/ZendOptimizer-4-3-x.so"

    #[Zend]
    #zend_extension=/usr/local/zo/ZendExtensionManager.so
    #zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

  9. mrmist
    Member
    Posted 1 year ago #

    Logically there cannot be anything wrong with your PHP install or your apache settings, because you say that the pretty permalinks work fine if you just do a fresh install.

    So it points to a problem that is being introduced when you copy across your existing content. Perhaps a theme issue or something?

  10. mrkingid
    Member
    Posted 1 year ago #

    possible but not likely as a fresh install with the same theme works fine.

    Besides it has happened on two sites i have built somewhere else and moved over. Won't be doing that anymore.

    I'd really hate to have to rebuild everything.

    Besides, what could it possibly be in a theme that would do that?

  11. mrkingid
    Member
    Posted 1 year ago #

    This is interesting

    In the WordPress address (URL)and Blog address (URL)boxes I had the addresses minus the 'www'

    On the other site that it works I used the www

    I went back and added the www to the address so it read. http://www.design-studio.com

    Then changed permalinks, but still no luck.

    I thought I was onto something as the other site I have permalinks issues with had the www missing as well.

    Could this still be something?

  12. Otto42
    Moderator
    Posted 1 year ago #

    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

    Does Apache have the mod_rewrite extension enabled?

    My guess is no.

  13. mrkingid
    Member
    Posted 1 year ago #

    Yup it's on.

    That is what is confusing me so much.

  14. mrmist
    Member
    Posted 1 year ago #

    Are you copying across directories when you copy your old install?

    If so, are the ownership and access permissions set correctly for your new host after the copy? (For example on some hosts if you unzipped a direct copy from another system it would unzip it with unknown owners)

  15. mrkingid
    Member
    Posted 1 year ago #

    I did copy directories over yes.

    Just went through the directories and the only difference from this site and the one that works is that the one that works has SGID checked when chmodding. Not sure what SGID is but I made the changes on the other site but still no go. :)

    I think you may be on to something though.

  16. mrkingid
    Member
    Posted 1 year ago #

    even deans permalink migration plugin doesn't fix the issue

  17. mrkingid
    Member
    Posted 1 year ago #

    Just removed php and did a fresh install thinking that was it... nope

    Any other ideas?

  18. Otto42
    Moderator
    Posted 1 year ago #

    Hmmm... Okay, so Apache has mod_rewrite enabled, but how about the AllowOverride setting for your web directory? It must have at least the "FileInfo" level, or "All".

  19. mrmist
    Member
    Posted 1 year ago #

    Hmmm... Okay, so Apache has mod_rewrite enabled, but how about the AllowOverride setting for your web directory? It must have at least the "FileInfo" level, or "All".

    The thing is he says that the permalinks work if he just has an empty, fresh, install. Only when he migrates does he get the problem.

    If it were an Apache config issue then it would always be broken.

    Bit confusing though, I don't see why migrating in posts would stop stuff working.

  20. Otto42
    Moderator
    Posted 1 year ago #

    Hmm.. is this a database dump being imported? Or a WordPress export being imported?

  21. mrkingid
    Member
    Posted 1 year ago #

    it was a DB dump that I imported from where it was created. All WP directories and files were copied over, config changed, etc.

    I followed all the directions to the 'T' as per the worpdress guide to moving a blog to another domain.

    The blog was developed at http://mysite.com/new_site_dev where the permalinks were working correctly and then was placed at http://www.design-studio.com and permalinks never worked properly again

  22. mrkingid
    Member
    Posted 1 year ago #

    Host says AllowOverride is set to all for the server.

    So, back to square one.

  23. mrkingid
    Member
    Posted 1 year ago #

    Posting solution for posterity sake:

    ------------------------------------

    HOLY SH*** I FOUND IT!!!!!!!!!!!!!!!!!!!

    Wooohoooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    For those two servers I have to add 'Options FollowSymLinks
    ' to the .htaccess file.

    So it would look like...

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    Options FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Damn.... over three months it has taken me to find the solution!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Sweet

    **HAPPY DANCE**HAPPY DANCE**HAPPY DANCE***
    --------------------------------------

  24. xjessie007@yahoo.com
    Member
    Posted 1 year ago #

    Just on the side, you were lucky to find your solution this way. Just for the sake of clarity...
    When enabling FollowSymLinks, it has to be defined in two places:

    First, FollowSymLinks needs to be enabled in httpd.conf. Here is an example what you might want to have in your httpd.conf.

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
    </Directory>

    Second, FollowSymLinks may need to be mentioned in .htaccess too. Here is an example
    Options +FollowSymLinks

    Third, know that FollowSymLinks improves the performance slightly. The effect is almost negligible, but just so you know. Whenever you can, use FollowSymLinks.

    Fourth, FollowSymLinks is good for security. You can hide your true location of your files and folders through it.

    Here is a good page on FollowSymLinks
    FollowSymLinks

  25. jlyon
    Member
    Posted 7 months ago #

    Thanks so much Michael - I was having the very same issue with netnation and wordpress.

    My situation was that pretty urls would work if the wp install was in a sub directory but not in the root www.mydomain.com/about would fail and www.mydomain.com/wordpress/about would work.

    Thanks so much for the solution, thankfully, I didn't have to spend 3 months.

    Great art by the way!

    Jonathan
    http://www.crowdpeople.com

Topic Closed

This topic has been closed to new replies.

About this Topic