WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] The page isn't redirecting properly (19 posts)

  1. fearRacious
    Member
    Posted 6 months ago #

    Im moving my multisite wordpress files to my localserver for testing..I have added the database and same username and password according to wp-config.php..After all the process of moving the files and importing the database..it gives me an error saying (The page isn't redirecting properly)..

    Here is my htaccess and wp-config..

    htaccess

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    and here is the wp-config.php

    define('WP_ALLOW_MULTISITE', true);
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'www.younescosmeticdentist.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    define( 'NOBLOGREDIRECT', 'http://www.younescosmeticdentist.com' );

    When i change the site to define( 'DOMAIN_CURRENT_SITE', '127.0.0.1 ' );

    and the path to define( 'PATH_CURRENT_SITE', '/younes/' );

    site says page has a redirect loop..If I dont change it it redirects to the site that was live...

    Anyone can help me how to fix it??I need to get my network admin to be working so i need to have it tested on localserver..

    Cheers|!

  2. WPyogi
    Volunteer Moderator
    Posted 6 months ago #

    Did you follow:

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    Since this is a multisite question, I'll move this thread to that forum.

  3. Sounds like you forgot to do the DB part.

  4. fearRacious
    Member
    Posted 6 months ago #

    Ipstenu, i did the db part..I also used the search and replace php script to replace it with the new link which is localhost..

  5. 1) Where is WP installed?

    Not 'locally' but like '~/Sites/mysite.com/' - The folder path :)

    2) What's the NEW URL?

    How do you access it on the browser?

    3) What are you using to run localhost? MAMP, LAMP etc?

  6. fearRacious
    Member
    Posted 6 months ago #

    Thank you for the reply Ipstenu..

    Here is my answer for the questions,,

    1) Where is WP installed?

    -----I used xampp server which its installed on htdocs/younes/

    2) What's the NEW URL?

    ----The new url is http://localhost/younes

    3) What are you using to run localhost? MAMP, LAMP etc?
    ---Im using xampp..

    Thanks

  7. Okay! #1 and #2 is important! See, you didn't JUST move WP, you moved it to a new domain (localhost) AND you put it in a folder.

    You have to edit the htaccess too:

    RewriteEngine On
    RewriteBase /younes/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . /younes/index.php [L]
  8. fearRacious
    Member
    Posted 6 months ago #

    Thanks Ipstenu...This is my firstime moving multisite to a localserver..So,thought its the same as moving the regular wordpress site..

    I have updated my .htaccess

    RewriteEngine On
    RewriteBase /younes/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . /younes/index.php [L]

    Do, I have to edit the wp-config.php on the multisite code??

    Thanks

  9. Yes.

    These lines:

    $base = '/';
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'DOMAIN_CURRENT_SITE', 'www.younescosmeticdentist.com' );
    define( 'NOBLOGREDIRECT', 'http://www.younescosmeticdentist.com' );

    They become this (I think...)

    $base = '/younes/';
    define( 'PATH_CURRENT_SITE', '/younes/' );
    define( 'DOMAIN_CURRENT_SITE', 'localhost/younes' );
    define( 'NOBLOGREDIRECT', 'http://localhost/younes' );
  10. fearRacious
    Member
    Posted 6 months ago #

    define('WP_ALLOW_MULTISITE', true);
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/younes/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost/younes' );
    define( 'PATH_CURRENT_SITE', '/younes/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    define( 'NOBLOGREDIRECT', 'http://localhost/younes' );

    I have changed it..Still didn't work...hmmmmm

    I also try to add http on the domain_current_site..but no changes happen.

  11. Try something different...

    Dump the site (FOR NOW!!) and make a clean multisite on the localhost. If THAT works, then you'll know what the settings should be :)

  12. fearRacious
    Member
    Posted 5 months ago #

    Hi Ipstenu...I try that one and compare my wp-config.php and .htaccess..

    Here is from the new install wp-config.php

    define('WP_ALLOW_MULTISITE', true);
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/mu/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and here is its htaccess

    RewriteEngine On
    RewriteBase /mu/
    RewriteRule ^index\.php$ - [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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    With from the old one..

    I made it the same..So from the old multisite I change it to the same as its on the new multisite..

    Here is the code for wp-config.php

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/younes/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost' );
    define( 'PATH_CURRENT_SITE', '/younes/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    define( 'NOBLOGREDIRECT', 'http://localhost/younes' );

    and for the htacces..I copy what was on the new multisite htaccess

    So,here is my htaccess for the old multisite

    RewriteEngine On
    RewriteBase /younes/
    RewriteRule ^index\.php$ - [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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    But,still no luck,,,..One solution I thought was to make a new fresh install but with the same database and same wp-config.php??Does that work on multisite??

  13. Did you also remember to edit the database?

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    if the paths changed, you have to edit there too.

  14. fearRacious
    Member
    Posted 5 months ago #

    Ipstenu,Yes, I double check it again and look at the wp-blogs table..I compare from the new and old one and saw the difference and did make it the same as the new one..It seems that the error is not showing up anymore the "page isnt redirecting properly". But its showing another error about a parse error, here is what the error is

    Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\younes\wp-content\themes\younescosmeticdentist\page.php on line 40

    Im using the twenty eleven theme on this site..Is this an error from our wp-config??

  15. I compare from the new and old one and saw the difference and did make it the same as the new one

    It's not the same, though. Remember the OLD site was in / and the NEW is in a folder. You have to make sure you did that correctly.

  16. fearRacious
    Member
    Posted 5 months ago #

    Yes...Cause in HTDOCS at xampp..I have the younes folder (Which is the old multisite) and mu folder(Which is the new multisite)...

    And at the Database, I have made it the similar as the new multisite..

  17. Wait... what? You've confused me and now you're bringing NEW problems in before you've (I think) solved one.

    Step back. Remember: I can't see your site, so you have to be calm, explain clearly, and experiment.

    State clearly what is the current problem you want to solve? PICK ONE.

    I know you have a lot, but let's start with one, okay? If you can't log in, we should start there.

  18. fearRacious
    Member
    Posted 5 months ago #

    Ohh..Sorry to make you confused..

    The error page isnt redirecting is now solved..

    I can login to the admin..But, I got this error when viewing the site

    Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\younes\wp-content\themes\younescosmeticdentist\page.php on line 40...
    Should I create another threads on this??

  19. Yeah, new thread for that, and let's mark this resolved :)

Reply

You must log in to post.

About this Topic