Existing WP Installation Broke Upon Additional Installation in Parent Directory
-
I Installed a second installation of WP in the root directory of which an existing blog was in a subdirectory. The new blog is working, the existing one isn’t.
Going to the existing blog brings up a blank page, I can’t access wp-admin or any of the previously existing blog’s pages. I tried pulling up readme.html just to make sure that URL was still working.
I checked wp-config, nothing was changed, also checked .htaccess and my existing blog’s database. Everything looks good.
Please help.
Thank you,
Matt
-
Did you install the new multisite as a subfolder or subdomain install, and what’s the new sites .htaccess?
It is a subfolder install. Google Chrome has been acting up on me lately and I noticed some folders in strange places in cPanel. I wonder if something got inadvertently changed or moved. I am not very familiar with .htaccess files.
Here is the .htaccess
RewriteEngine on RewriteCond %{HTTP_HOST} ^foodintegritynow.com$ [OR] RewriteCond %{HTTP_HOST} ^www.foodintegritynow.com$ RewriteRule ^/?$ "http\:\/\/foodintegritynow\.org" [R=301,L] RewriteCond %{HTTP_HOST} ^foodintegritynow.net$ [OR] RewriteCond %{HTTP_HOST} ^www.foodintegritynow.net$ RewriteRule ^/?$ "http\:\/\/foodintegritynow\.org" [R=301,L] # 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
Thanks for your help.
OK. I think it is something with the database that is causing this problem. I installed a new copy of WP into another subdirectory. When I imported the database, it is giving me the same blank page.
Does anyone know what I need to change in the database so it can load correctly?
A blank page is a php error, not an htaccess error. Look at the error logs on the server.
When you installed, did you remove anything, like the default twentyten theme? Because that will cause a white screen.
That’s also not the right .htaccess for subfolders.
RewriteEngine on RewriteCond %{HTTP_HOST} ^foodintegritynow.com$ [OR] RewriteCond %{HTTP_HOST} ^www.foodintegritynow.com$ RewriteRule ^/?$ "http\:\/\/foodintegritynow\.org" [R=301,L] RewriteCond %{HTTP_HOST} ^foodintegritynow.net$ [OR] RewriteCond %{HTTP_HOST} ^www.foodintegritynow.net$ RewriteRule ^/?$ "http\:\/\/foodintegritynow\.org" [R=301,L] # BEGIN WordPress <IfModule mod_rewrite.c> 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).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] </IfModule> # END WordPress
I can’t help but wonder about the redirects for foodintegritynow.com too, but we should start with the .htaccess and themes π
Andrea,
Thanks for your interest in my problem. To make this easier to understand I will call my previously existing site, “subdirectory wp site” and the new install, “parent directory wp site”. The “parent directory wp site” is installed in the root of my public_html directory and the “subdirectory wp site” is the one that is broken.
When I was first installing the “parent directory wp site” I was transferring it from my local MAMP server. I just uploaded everything into my root public_html directory and then imported the mysql database using phpMyAdmin. I was having issues getting it to work even after I changed wp-config, I think there were variables in the database that were preventing it from working. I was just getting 404 errors. So finally I deleted everything I uploaded for this site in the public_html directory, and did a fresh install. I never touched anything in the existing “subdirectory wp site”.
I got the new “parent directory wp site” to work on the new installation by using the Tools->Import command from within the WP administration interface and then installed the custom theme I created on my local MAMP server.
Going through phpMyAdmin, I somehow lost the database for my previously existing “subdirectory wp site”. Or actually the one I thought it was has entries for my new “parent directory wp site” and does not have any of the old “subdirectory wp site” entries. Perhaps I inadvertently imported into the wrong database. When you import into a database with phpMyAdmin, does it add to that database’s entries or replace them?
So now I did a fresh install for the previously existing “subdirectory wp site” in a separate subdirectory. It is completely working until I try to import the back up file of this site’s mysql database, then it gives me the blank screen. If I point it towards another database, it works but I don’t have the data I am trying to get back.
Any thoughts?
I am definitely going to do lots of backups through Tools->Export in the future!
Thanks,
MattThanks ipstenu, it looks like you posted that while I was writing my lengthy memoirs.
Those redirects were created when I used my hosts web-based interface. I just looked up my .htaccess for the new currently working fresh install (but no data) and here is the .htaccess:
# 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
It is the same as above without the redirects. I have to leave the house for most of the day, but I will be able tinker with your .htaccess suggestions later this evening. Thank you for your help.
Matt
That .htaccess is perfect. For a Single Site install π When you have multisite you need more, but the .htaccess file is different if you have SubFolder or Subdirectory.
I keep saying I’m going to make a codex page about the damn thing π
Ok, that .htaccess file is in the subfolder.
Do you have any ideas on how to fix the database I am trying to import?
Now that I’ve rebooted 6 times (damn Windows XP)…
When you import into a database with phpMyAdmin, does it add to that database’s entries or replace them?
Add to — Normally. HOWEVER. If you’re using the same table names, I believe it tells you that the tables already exist. Been a while since I tried that… Usually I edit the tables from wp_ to newwp_ when I’m doing that.
So now I did a fresh install for the previously existing “subdirectory wp site” in a separate subdirectory. It is completely working until I try to import the back up file of this site’s mysql database, then it gives me the blank screen. If I point it towards another database, it works but I don’t have the data I am trying to get back.
Which gives you a blank screen? The phpMyAdmin bit or WordPress?
You SHOULD be able to copy the wp_posts and wp_postsmeta (and wp_comments and wp_commentsmeta) over and have all your posts…
I didn’t get any warnings about tables already existing while doing my import. WordPress gives me the blank screen, not phpMyAdmin. Thanks for the info, I will dig into the DBs later today. Hopefully, I can resurrect some stuff.
Thanks,
MattWordPress giving you a blank screen is good! That’s usually a PHP error.
Delete (BACKUP! π ) your theme and copy up the twentyten theme folder. That SHOULD force you to default to that theme, and maybe it’ll work.
ipstenu, can you advise me what options I would need to select to copy one table to another? I am getting errors while copying “Data only”. I tried “Add AUTO_INCREMENT value” both on and off.
Here is the error:
SQL query:
INSERT INTO
foodtestone
.wp_posts
SELECT *
FROMfoodtestthree
.wp_posts
MySQL said:
#1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
Thanks,
MattThat means there’s already an entry with a value of 1 in the table you;re trying to copy into.
If you have nothing of value (i.e. nothing you want to keep) in foodtestone.wp_posts then you can wipe it.
- The topic ‘Existing WP Installation Broke Upon Additional Installation in Parent Directory’ is closed to new replies.