PHP Error – subdirectory is in URL twice

[ad_1]

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 4 hours, 29 minutes ago by marktea1.
  • This topic was modified 4 hours, 22 minutes ago by marktea1.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer