Jump to content

overwrite the config file in a wordpress-installation - is this doable?


dil_bert

Recommended Posts

dear Community,


what if i overwrite the config-file - with a new one?

Can i (or better said; do i have to)  install the wholes system new?!

love to hear from you

note : ive messed up the whole thing
cannot access the admin area -
unfortunatly the password - resend - function does not work due to some theming issues
and last but not least - i cannot get acces via the webmin-backend in the db.

so the question is : what to do now!?

Link to comment
Share on other sites

Certainly you can overwrite it.  It is simply a file that gets included like any other php file.  The problem for you is how to recreate it now that it's lost?   

You basically have a couple of options:  

  •   Create a new file in your exising installation with an editor and hand code the php that you need.
  •   Create  a new wordpress install on some other machine or server or directory, and copy that config file over to your existing wordpress installation.

There is nothing magical about the wp-config.php file, other than that wordpress creates it for you (permissions allowing that).    You can hand edit it in place, with an editor (like vi for example) and modify variables if that is what you need to do to get normal access working again.

Here's an article with some more details, as I don't typically work with Wordpress.

 

There's also a wp-config-sample.php file you can use as a template for a hand edited file, with the required variables already commented.

Link to comment
Share on other sites

Moving topic to Applications and Frameworks > Applications, since the post is about WordPress.

@dil_bert - When posting a topic, please review the list of forums available on PHPFreaks before posting in Miscellaneous. If you have a programming question involving Perl or Python, for example, we have an Other Programming Languages forum. There is an Editor Help forum for questions about IDEs.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.