WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] moved servers and broken navigation (30 posts)

  1. Rob
    Member
    Posted 1 year ago #

    Hey all thanks in advance for time and suggestions!

    step 1: I moved database to another box. all is good and site works great.

    step 2: I need to move wordpress and all the files to another instance of linux I am using, not the same server as the database. I was able to install all the LAMP stack on my new instance, move the entire wordpress install I was using on old server to new one(including .htaccess, wp-content etc). made sure mode_rewrite is install, changed the AllowOverride to All in the sites-available file. the site comes up but does not allow me to navigate to anything (404). Some plugin's seem broken too, but I am guessing if I get this navigation thing worked out they might work. All the domain names are mapped the same as well and seem to work its just the pages and post that don't. I use pretty permalinks, but it doesn't work using default settings either.

    again thanks for your help.

  2. You should have updated your wp-config to point to the DB location, since it won't be localhost anymore.

  3. Rob
    Member
    Posted 1 year ago #

    the database part worked fine (that was step 1), and my new server that is now hosting my multisite wordpress site talkes to the database correctly, but I am unable to navigate to the pages and posts.

  4. I have to be pedantic because you've never once mentioned your wp-config.php file :)

    You did edit that right? Saying 'I moved the DB' just means you moved the DB. I can't magically see what else you did (rumors of my psychic powers aside) so I gotta nag and ask.

    And did you also bring your .htaccess over?

  5. Rob
    Member
    Posted 1 year ago #

    aside from being magical, in my orginal post I did say that I move my entire old wordpress install including .htaccess. However i did not mention my wp-config you are right but I moved that too, and all other files from my install. I will spread more rumors of you powers on twitter.

  6. When one file's not mentioned, we doubt everything ;)

    Try re-saving your permalinks on your main site, see if that magically works?

  7. Rob
    Member
    Posted 1 year ago #

    No magic for me today Mika, saved the permalinks but the problems persists.

  8. Well. Okay, roll up your sleeves.

    Can you post the content of your .htaccess?

  9. Rob
    Member
    Posted 1 year ago #

    Interesting stuff, I got rid of the wptotal cache stuff and changed my .htaccess to look like the following

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    top level site now works but subsites dont work still.

  10. What's happening on the subsites? 404s?

  11. Rob
    Member
    Posted 1 year ago #

    yes 404's

  12. cinghaman
    Member
    Posted 1 year ago #

    just adding a guess but did u check in your config file and updated
    define( 'DOMAIN_CURRENT_SITE', '' );
    define( 'PATH_CURRENT_SITE', '' );

    them to point to your new domain

  13. Rob, have you turned off all your plugins? You mentioned the caching plugins, make sure those are off, and not just removed the htaccess stuff.

  14. Rob
    Member
    Posted 1 year ago #

    sorry got busy, plugins are off. still 404'n

  15. When you moved sevrers, did the domain name change?

  16. Rob
    Member
    Posted 1 year ago #

    no name changes

  17. Rob
    Member
    Posted 1 year ago #

    as another note i have AllowOverride ALL for

    <Directory />
                    Options FollowSymLinks
                    AllowOverride ALL
            </Directory>
            <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
  18. Try this:

    AllowOverride All Fileinfo Options

    For whatever reason, All doesn't mean ALL :/

  19. Rob
    Member
    Posted 1 year ago #

    I changed the AllowOverride as you suggested and restarted apache to make sure it was all good and still get my lovely 404 page.

  20. So it's this:

    <Directory />
                    Options FollowSymLinks
                    AllowOverride All Fileinfo Options
            </Directory>
            <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All Fileinfo Options
                    Order allow,deny
                    allow from all
            </Directory>
  21. Rob
    Member
    Posted 1 year ago #

    That is correct.

  22. Just checking.

    Rewind, what's in your .htaccess?

  23. Rob
    Member
    Posted 1 year ago #

    ny .htaccess is currently the one I posted earlier. by the way thanks for all your help slugging through this!

  24. Sorry, I went back to double check and missed it.

    Augh. This is annoying.

    The .htaccess is right
    The httpd.conf is right
    The plugins are off...

    There's no reason this should happen.

    Can you install a second, separate, instance of WP and see if multisite breaks there? I wonder if there's something wonky on the server itself.

  25. Rob
    Member
    Posted 1 year ago #

    so maybe some of my steps can help find a problem

    1. moved database to another server, this happened a few weeks ago and has been working correctly all getting me ready to do this move.
    2. installed LAMP on my new server. including making sure mod-rewrite was loaded and running.
    3. copied files from old server to new server (including but not limited to ones you have already seen) I literally just copied all my files from root of old server to my /var/www/. Did not run any installation scripts or anything.
    4.wp-config.php from old server already points to database
    5..htaccess as shown earlier.
    6. http.config as shown earlier.
    7. file permissions and ownership all set

    really is strange that top level list works and i get 404's on subsites

  26. If you make a brand new site on the network, is it a 404 as well?

  27. Rob
    Member
    Posted 1 year ago #

    new subsite works, I am able to go right to the hello world post

  28. Okay! That's good news!

    I have a theory. But you won't like it.

    I want you to rename your plugins folder to plugins-old.

  29. Rob
    Member
    Posted 1 year ago #

    after that do i test the site to see if it works? restart apache? change name back if it does work? If this gets it to work, then I like it. You have been so helpful, thank you.

  30. Rob
    Member
    Posted 1 year ago #

    ok, that worked, and I found the offender, I activate most plugins at subsite, but had this one network activated. Hence I thought I had them all turned off....thank you so much mika!

Topic Closed

This topic has been closed to new replies.

About this Topic