PHP Error – subdirectory is in URL twice
-
Hi,
I’ve just moved a WordPress site onto a different URL into a subfolder.
When I was changing everything over, I added the new location to the site URL etc. via the database. I then added the extra part of the URL to the index.php file (in this case it was “/wpnew”, the subdirectory the website is in), and then realised I didn’t need to add it to index.php because it then appeared twice in the URL and produced a PHP error. I removed it from index.php and resaved, then the website seemed to work again.
However that was when I was logged in, so I tried in a different browser (which should have shown me a maintenance screen). But, when I’m not logged in, I still see the PHP error message with the /wpnew part of the URL repeated twice, when it should only be there once because I have deleted the extra /wpnew from index.php.
Fatal error: require(): Failed opening required ‘/home/customer/www/****.com/public_html/wpnew/wpnew/wp-blog-header.php’ (include_path=’.:/usr/local/php74/pear’) in /home/customer/www/****.com/public_html/wpnew/index.php on line 17
Can anyone tell me how I can stop this happening? It should have gone because it’s been deleted, but obviously WordPress still thinks it’s there for some reason! It only happens when I’m logged out – everything works when logged in and there’s no error message.Thanks for any help!
- This topic was modified 10 months, 2 weeks ago by .
- This topic was modified 10 months, 2 weeks ago by .
The page I need help with: [log in to see the link]
- The topic ‘PHP Error – subdirectory is in URL twice’ is closed to new replies.