Two copies of WP on my site – oops.
-
I just discovered that one of the first WP sites I did for a client (over a year ago) is all messed up, and each “fix” I’ve tried hasn’t worked. Looking for some guidance. Please excuse the length, but hopefully it will provide all the details for a quick reply.
When I first installed WP on this client site, I installed it in a sub-folder /wp/ so the client’s existing static site could continue running while I was developing the new WP site.
When the development was complete, instead of just deleting the static site and changing the site URL from domain.com/wp to domain.com like I SHOULD have, I actually went through the steps in the codex for MOVING a site on the same server. I copied all the folders and such to the root directory, (left copies in the /wp/ folder too), etc.
Now, a year later, when I don’t really remember all the details of what I did, I attempted to install a plugin for the client. Long story short, it wouldn’t work. In the end, I discovered that is because somehow, SOME of the site is using the files in the root folder, and SOME of the site is accessing files in the /wp/ folder.
The first thing I did to try to fix this is to change the WordPress URL to domain.com/wp but left the site URL at domain.com. Then I had to copy a bunch of images from the root uploads folder into the /wp/wp-content/uploads folder, etc. etc. I believe now everything that should be in the /wp/ folder and subdirectories is there, and the site is working, but when I attempted to delete all the WP files (EXCEPT .htaccess and index.php) from the root directory, my home page would not load. All other pages on the site did work though – just not the home page.
I want to delete all the WP files from the root and only run off the /wp/ folder. Here are some things I think I need to address:
The contents of my .htaccess file in the root directory are strange, I don’t remember why I did this but I think it’s wrong:
‘<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule># 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 ‘
I also think that my index.php file in the ROOT directory needs to change:
‘define(‘WP_USE_THEMES’, true);require(‘./wp-blog-header.php’);’
My thinking is that needs to say ./wp/wp-blog-header.php; but then when I look at the contents of that file, I wonder if the wp-blog-header.php file in /wp/ will have to also change?
Are there any other things I need to change that I’m not thinking of?
Thanks in advance.
- The topic ‘Two copies of WP on my site – oops.’ is closed to new replies.