WordPress.org

Support

Support » Installation » [Resolved] Trying to put WP on my pc for testing can't open wp-config

[Resolved] Trying to put WP on my pc for testing can't open wp-config

  • I am following instructions at webdesignerwall.com for installing on local pc for test site. Downloaded wordpress into folder with path C:\xampp\htdocs\testsite\wordpress. I renamed wp-config-sample.php to wp-config.php as instructed. I want to open this file and reset db_name, user, password, host, but WinZip tells me “Cannot open file: it does not appear to be a valid archive.” I started over with the download to make sure the download was good. Also tried opening wp-config-sample.php without renaming. Same result.
    Help….Please 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • To edit your wp-config.php you need to use editor like Notepad++

    you should be able to use the install script
    like
    http://localhost/testsite/wordpress/wp-admin/install.php

    how do I edit my wp-config.php? I am a beginner. I cannot open this file. It is zipped.

    You need to unzip the wordpress folder you downloaded and you will have another unzipped folder called wordpress you need have that folder in \htdocs\testsite not unzipped one.

    When I try to unzip the wordpress file wp-config.php, I get the message:
    “Cannot open file: it does not appear to be a valid archive.”
    The file will not open using WinZip.

    Bryan Villarin

    @btvillarin

    Happiness Engineer at Automattic

    Slightly dated, but this guide should help, too:

    http://tamba2.org.uk/wordpress/xampp/

    esmi

    @esmi

    Forum Moderator

    wp-config.php isn’t a zip archive. It’s just a file. Try opening it using a plain text editor like NotePad.

    wp-config.php file not zipped you need open in the editor to edit the file.

    Yey! I have it open in Notepad. Will now attempt changes. I opened the file that is located here: C:\xampp\htdocs\testsite\wordpress. I hope that is ok.

    esmi

    @esmi

    Forum Moderator

    That sounds about right.

    I made the changes and saved the file in Notepad. I then opened a new browser and entered this address: http://localhost/testsite/wordpress/wp-admin/install.php.

    I got the message: Warning: define() expects at least 2 parameters, 1 given in C:\xampp\htdocs\testsite\wordpress\wp-config.php on line 22

    esmi

    @esmi

    Forum Moderator

    Go through wp-config.php again. Sounds like you left something out or inadvertently deleted too much.

    Yes, yes, YES!!! Got it. Thanks to all who helped. Somewhere, somehow I think I screwed up a password between MySql and PHPadmin, which I attempted to fix (successfully I think) by editing in php config file. Then I created a new user for the database wordpress in phpMyAdmin, and tried to straighten out all the pathways and usernames, passwords etc. Somehow, like making sausage, it worked. Only it was like making sausage using a german recipe and a german/english dictionary.

    WordPress is now functioning on my computer.

    Thanks again for all the tips

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Trying to put WP on my pc for testing can't open wp-config’ is closed to new replies.
Skip to toolbar