0
votes

I installed the Wordpress 4.2 on my local server and copy my theme to wp-contat\themes. When I run the Wordpress admin panel and select the theme it gives me this error:

Warning: require_once(http://localhost/isee/wp-content/themes/isee/includes/db.php): failed to open stream: HTTP request failed! HTTP request failed! HTTP/1.0 404 Not Found in D:\wamp\www\isee\wp-content\themes\isee\modules\careers.php on line 6

Fatal error: require_once(): Failed opening required 'http://localhost/isee/wp-content/themes/isee/includes/db.php' (incpude_path='.;C:\php\pear') in D:\wamp\www\isee\wp-content\themes\isee\modules\careers.php on line 6

wordPress theme errorcareers.php and db.php place on the target

enter image description here

1
I am new In wordpressMuhammad Bilal
Comment the previous define statement to prevent it from redefine the constant make sure you have db.php in your_theme/modules/carrers/includes/Domain
I solved this Issue Thank Dakkaron and WisdmLabsMuhammad Bilal
Do you really use Wordpress version 4.2? The current Wordpress version is 5.7... Actually, that (and its incompatibility with other parts of you local server) might be the issue.Johannes

1 Answers

0
votes

It is not as simple as copy and paste files. You need to set up a new theme. Check if you copied in a totally different directory as your original wordpress. In that case, what you did is to set up a complete different wordpress instance. What you need to do in that case, is to create an empty database in phpMyAdmin with the same name as your new wordpress site. Just be careful not to duplicate the name of the previous instance. In case you only copied the theme folders in a new folder, you need to update the style.css file to be a child from the original folder you copied from. You can go to developer.wordpress.org to see under ThemeHandbook->Theme Basics->Theme Files AND GO TO THE BOTTOM. There you fill find the code you need to copy and paste in a style.css fyle in your root theme directory.