0
votes

I have made site live(URL: http://dev.localwebtest.com/nirlg/) but I am getting following two errors when trying to open the dashboard. But everything is working fine on localhost. Any help would be greatly appreciated

Warning: require_once(/home/nettech2010/public_html/nirlg/wp-admin/includes/admin.php): failed to open stream: No such file or directory in /home/nettech2010/public_html/nirlg/wp-admin/admin.php on line 82

Fatal error: require_once(): Failed opening required '/home/nettech2010/public_html/nirlg/wp-admin/includes/admin.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nettech2010/public_html/nirlg/wp-admin/admin.php on line 82

Thanks

2
Have you uploaded wp-admin and wp-includes folder ?Kausha Mehta
check weather admin.php file exists or not if exists then check file permissionChetan Ameta
yeah I have uploaded the wp-admin and wp-includes folder. Also admin.php file do exist and its permissions are 644. I don't know why its is giving this errorShivam
Post screenshot of directory structure of your FTP.PHPExpert
dev.localwebtest.com/nirlg/sshot.png here is the structureShivam

2 Answers

2
votes

I got it working by by uploading the fresh wp-admin and wp-includes folders. There must be some corrupt file in there which caused this problem. Anyway thanks for your kind support.

1
votes

I had similar access issues moving the website from a local dev to a live environment. Have you made sure that all the relevant fields are changed in the database? Because its not enough to just copy the database and only change the url in the admin panel. It looks a bit like the include paths might not be right...

What I mean is, have you replaced all the local url links in the database with the new ones? This has solved the issue for me.

In case you haven't here is what you should update, connect to your SQL database (via command line or phpMyAdmin) and execute the following SQL statements:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Here is the tutorial for this which helped me a lot when transferring wordpress from one environment to another: https://wpbeaches.com/updating-wordpress-mysql-database-after-moving-to-a-new-url/

Cheers!