WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Went Multisite, then changed my mind, now I can't get the wp-login to show (24 posts)

  1. ELowe
    Member
    Posted 3 years ago #

    I made a big mistake today and tried to create a multisite set up for my website. When prompted, I moved all the files to the root (they had been in a sub-directory). Once I had established that, the appearance of the site was not to my liking, so I impulsively moved everything back.

    My problem is this:

    1. All my files are in place
    2. I corrected the .htaccess & wp-config files
    3. The database seems to be okay (I deleted all the pieces that the multi-site exercise created)
    4. When I point my browser to my usual log in screen, the php code returns a blank page. So I can't get into the dashboard to correct permalinks, etc.

    Additionally, when I point to the sub-directory, I get a listing of all the php files

    Any ideas?

    I'm running 3.1

    Site should be here
    Files located in subdirectory "wp"

  2. ELowe
    Member
    Posted 3 years ago #

    Oh, this is what my .htaccess file looks like:

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

    # END WordPress

  3. ELowe
    Member
    Posted 3 years ago #

    Could this be as simple as adding 'wp' to the RewriteBase line in the .htaccess file?

  4. Krsna.Booti
    Member
    Posted 3 years ago #

    Hi Elowe!
    The installation of WordPress Multisite always suggest to backup wp-config.php and .htaccess before converting into Multisite. If you have backed up then restore it. If not then following are the lines of default .htaccess file of a WordPress blog.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME}!-f
    RewriteCond %{REQUEST_FILENAME}!-d
    RewriteRule ./index.php [L]
    #END WordPress

    Take a look at http://www.digit-8.com/security-tips/hacked-and-default-htaccess-file-in-wordpress/ for more information. Steps:
    1. Backup Current file to a safe location.
    2. Copy it and remove its content as shown above or in the Website referred.
    3. Upload to the root folder.
    4. Right click the file in FTP and set the permissions to 644.
    5. Open Your Website and a post
    6. Come back and set the permissions to 666.

    Please inform whether it works or not.

  5. ELowe
    Member
    Posted 3 years ago #

    Thanks Krsna.Booti

    I tried restoring my saved version of .htaccess & wp-config, to no avail.

    If were to delete my database & wp files, do a clean install, then import my saved database, would that solve this problem?

  6. Go to http://pfarc.com/wp/

    Your index.php is missing. NOTHING WordPress will work without that :D Grab a fresh copy from http://wordpress.org/download/

  7. ELowe
    Member
    Posted 3 years ago #

    I know that. I put up an html page as a placeholder for now until I sort this out. It wasn't working with the index.php either. I will try again and check back.

  8. Krsna.Booti
    Member
    Posted 3 years ago #

    Hi ELowe!

    The problem can be solved with clean installation of wordpress but this will take a lot of time. Please try below steps before the same.

    I hope you have removed amendments to get WordPress into multisite already. However, I request you to check again whether you have removed following things properly or not.
    1. Remove all the lines added to wp-config.php
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    2. Change the 'true' option of following line to 'false'
    define('WP_ALLOW_MULTISITE', true);
    3. Remove the two fields added to the users table that are multisite-only (deleted and spam columns).
    4. Remove the following tables in database (prefixed by your DB prefix which is generally wp_):
    1 wp_blogs
    2 wp_blog_versions
    3 wp_registration_log
    4 wp_site
    5 wp_sitemeta
    6 wp_signups
    7 wp_sitecategories (if you have global terms enabled)

    If yes, then
    1. download the wordpress 3.1 setup zip file.
    2. Extract it and edit wp-config-sample.php in the same way to install a fresh wordpress website.
    3. delete the .htaccess file.
    4. Try to login in wordpress dashboard.
    5. Go to Settings>Permalinks and regenerate the .htaccess file.

    If still it does not work then you can go for clean installation of WordPress. I hope you know how to retrieve your posts from the earlier database.

  9. ELowe
    Member
    Posted 3 years ago #

    In the past, I've had the index.php in the root, with everything else in my subfolder (wp). When I put the index.php in the subfolder, all I see when I point to my domain is a listing of the root.

    Naturally, I don't want that! I put the index.php back in the root and returned to my original problem.

    Next, I added another copy of index.php to the subfolder, and now get an error message.

    From that page I can see that the permalinks have added a "blog" subfolder, which doesn't exist.

  10. It won't work without it. Ever.

    With it, I get a page with errors. Which is progress! :D

    Viewing the source, I see http://pfarc.com/wp-content/themes/atahualpa/images/favicon/PFA4.ico" and that tells me you're doing the old 'put WP in a folder, have it act like it's in root!' trick. Except... For some reason when I go to http://pfarc.com/wp/wp-admin it redirects me to http://pfarc.com/wp-login.php

    THAT isn't right. It should be http://pfarc.com/wp/wp-login.php which comes up unstyled.

    Can you share the content of your .htaccess? I think you have some goofiness going on between that and POSSIBLY your wp-config.php

    You may need to force this in your wp-config.php for a bit:

    define('WP_SITEURL', 'http://pfarc.com/wp/');
    define('WP_HOME', 'http://pfarc.com/wp/');
  11. ELowe
    Member
    Posted 3 years ago #

    Thanks for the detailed instructions Krsna.Booti, I'll go through that checklist and report back.

  12. ELowe
    Member
    Posted 3 years ago #

    Ipstenu: my .htaccess lines read like this:

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

    # END WordPress

  13. Of note - http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    You CAN have the index.php in root, but there are TWO requirements, and I'm betting you didn't follow them right now.

    1) You COPY the file from /wp to /
    2) You EDIT the copied file

    Steps 8 and 9 from the link:
    8. Open your root directory's index.php file in a text editor
    9. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wp/wp-blog-header.php');

    Do that INSTEAD of what I said with the defines, see if it helps.

    The .htaccess looks good, so this is the likely culprit.

  14. ELowe
    Member
    Posted 3 years ago #

    That's getting me closer I think. Still not getting the right theme, but I'm not too worried about that. Of more concern is the lack of proper links, and the fact that I can get to a log in screen (without the wordpress theme) but when I try to log in, I get a page not found error.

  15. ELowe
    Member
    Posted 3 years ago #

    Krsna.Booti - I had deleted all the items listed in your last post. I'm checking to see if the two fields in the users table are still there right now.

    I think there must be something left over from the multi-site exercise, because the links that show up on the "page not found" page are trying to direct me to a location within a non-existent folder named "blog"

  16. Did you correct the index.php in the root to have require('./wp/wp-blog-header.php'); ?

    If you view the source of http://pfarc.com/wp/wp-login.php it's pointing to http://pfarc.com/wp-admin/css/login.css

    See the lack of the WP? THAT is why you cannot login. Your site thinks it's installed one folder up, when it's really not...

    Okay, let's kick it. Put this in your wp-config.php

    define('WP_SITEURL', 'http://pfarc.com/wp/');
    define('WP_HOME', 'http://pfarc.com/');

    (You did the uninstall correctly, the causality would be the whole 'act in root' thing, which doesn't work with MultiSite, and installing it that way seems to have munged things badly.)

  17. ELowe
    Member
    Posted 3 years ago #

    OK, I think I may have found something.

    In my users table, the fields "deleted" and "spam" exist. I don't see an obvious way to delete those two fields.

    Can you suggest a method?

  18. ELowe
    Member
    Posted 3 years ago #

    Ipstenu, I did correct that line in the index.php that exists in the root. I suppose I need to correct that same line in the version that exists within my subfolder?

  19. Elowe - The Database is fine for now. Leave it alone. It won't affect anything right now :) Once you turn off multisite, it's inert.

  20. Ipstenu, I did correct that line in the index.php that exists in the root. I suppose I need to correct that same line in the version that exists within my subfolder?

    No, DO NOT edit that subfolder file!

    Add THIS to your wp-config.php please

    define('WP_SITEURL', 'http://pfarc.com/wp/');
    define('WP_HOME', 'http://pfarc.com/');

    And leave your DB alone. I promise you, you DO NOT need to delete anything else right now. What's in there, the extra tables etc, WILL NOT hurt you.

  21. ELowe
    Member
    Posted 3 years ago #

    Thanks Ipstenu.

    Do those two lines need to be in any specific location?

    After the other MySQL settings?

    Or just at the end of the file?

  22. Never at the end of the file ;) Put 'em where you had the multisite lines. By WP_DEBUG is good.

  23. ELowe
    Member
    Posted 3 years ago #

    I put them before the Authentication Keys and *good things* are happening!

    Looks like that fixed it. Now I just need to clean up my permalinks.

    Thanks very much for your help. It has been a life-saver!

    By the way, something odd I noticed is the introduction of an additional backslash in the urls of the pages. Is that related to the two lines we dropped into the wp-config file?

    It doesn't appear to be a problem, links without the extra '/' still work, but it just seems like I should try and clean that up.

  24. No problem :)

    NOW you'll probably want to hit up the database and edit the site URL and home URL in there. I suspect you set 'em both to http://pfarc.com by accident, and WordPress lost it's wee little mind!

    Read http://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database

    The extra fields in the Users table are fine, by the way. They won't hurt you AND they may be able to be utilized in future versions of WP.

Topic Closed

This topic has been closed to new replies.

About this Topic