0

In Openshift I have 1 application. I copied it to my localhost running wordpress website. I overwritten my localhost files. I copied all the files from data directory and as well as I copy mysql to overwrite my localhost mysql. Now I try to run the website. It gave me the following error message.

Warning: require_once(.openshift/openshift.inc): failed to open stream: No such file or directory in C:\wamp64\www\my-site\data\current\wp-config.php on line 114

any idea what I can do to fix this problem. What are the things I miss setup?

Thank You

slen
  • 21
  • 3
  • Possible duplicate of [Failed to open stream : No such file or directory](http://stackoverflow.com/questions/36577020/failed-to-open-stream-no-such-file-or-directory) – Vic Seedoubleyew Apr 26 '16 at 12:27

1 Answers1

0

If you run your wordpress site on localhost you don't need the openshift references. So comment out wp-config.php line 114 (because it requires the .openshift directory). Run it again and you will probably get some more errors (you don't need openshift hooks etc). Furthermore, it seems you didn't do the mysql part right. You should create a database (you dont have to overwrite one) and set the database credentials in your wp-config: https://codex.wordpress.org/Editing_wp-config.php#Set_Database_Name

Hope this helps

user3791775
  • 426
  • 3
  • 5
  • Sorry I can't make it running. I defined the local database and comment out the openshift reference. I got "HTTP 500 error" is it because of no database?.. how should I copy the database from openshift to my local with fizilla FTP client. I used to copied the one from mysql/data – slen Apr 24 '16 at 14:36
  • First set up you wordpress to debug true in your config: https://codex.wordpress.org/Debugging_in_WordPress Then: install mysql: http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html Then: export your database (as a .sql file) and import it in your local mySql (install heidisql for example) – user3791775 Apr 25 '16 at 00:31
  • I don't understand this part. "Then: export your database (as a .sql file) and import it in your local mySql (install heidisql for example) " where to export from openshift. I got mysql installed earlier in xamp server. And, I put the debugging in the config. didn't see anything. just HTTP 500 error – slen Apr 25 '16 at 02:56
  • In openshift you can enable phpmyadmin. Then backup your database https://codex.wordpress.org/Backing_Up_Your_Database After that import that .sql file in your local database. About the 500 error: Google it: for example http://www.makeuseof.com/tag/the-ultimate-guide-to-solving-500-internal-server-errors-and-blank-white-pages-in-wordpress/ – user3791775 Apr 25 '16 at 13:47