• Hello, I have recently taken my first programming project and it is with word press, I have never used it before as I have only done hard coding HTML/CSS before. My client has given me all of the files of her site, how do I run this on wordpress. I have installed wordpress and can run the test123 site but when I do the same thing on the local server with the info she gave me then I get a “Error establishing a database connection”. This is surprising because all of the file folders in the info she gave me is the same as the test site (obv the content is different). She was doing it on a mac and I am on windows but I assume that hsouldn’t matter. How can I fix this so I can see the site on wordpress and make the required changes that she wanted.

    Thanks!

    I tried changing the config file but that just gives me the setup again and not the site she has already made πŸ™

Viewing 15 replies - 1 through 15 (of 16 total)
  • Jason King

    (@jasoncharlesstuartking)

    You said your client has given you all the files of her site.

    So let’s confirm that.

    Do you have WordPress files? Lots of PHP and CSS files, organised in folders with names like wp-admin, wp-content and wp-includes?

    Also, do you have the MySQL data? WordPress stores all the posts and pages in a database, not in PHP files.

    If so, have you created a MySQL database locally and imported that data yet? Then changed the database connection details in wp-config.php? If not, you are bound to get “Error establishing a database connection”.

    Thread Starter a22mu

    (@a22mu)

    Hello and thanks for the response. I have wordpress files in the folders as you said.

    How would I know if I had MySQL data, what extension or folder would that be in. I do not think I have it as the files I have are all identical in name to the files that I downloaded for initializing wordpress on my local host. I have created a MySQL database but haven’t imported any data as I don’t think I have it.

    How can I confirm if I have the SQL data?

    Dion

    (@diondesigns)

    Databases are managed by MySQL and are completely independent of WordPress. Your client would have had to create a DB backup, and then provide the backup separate from the WordPress files.

    You should ask your client whether they created a DB backup I suspect they did not, and you will not be able to do anything until you import that backup database into your own MySQL insallation.

    Thread Starter a22mu

    (@a22mu)

    Okay, I understand. I have emailed my client and asked her for the database information.

    Thread Starter a22mu

    (@a22mu)

    Okay, I have the database and have imported it. I changed the WPconfig file to the new database name and made the sure the password was right. I went into the Wp_options folder in the database and set the URL to the local host folder. However when I try to connect I get a “This site can’t be reached localhost refused to connect.”

    I just want to get into the site so I can edit it πŸ™

    Dion

    (@diondesigns)

    Did you set the correct database information in the wp-config.php file? Note that database users are separate from databases; if you did not create a database user yourself, you’ll need to do so.

    Thread Starter a22mu

    (@a22mu)

    How do I create a database user? I installed the database and have a root user account.

    I have the SQL data and the wordpress site data (with wp folders) what else do I need?

    Thread Starter a22mu

    (@a22mu)

    I created the user and added it to the wp-config file and it still doesn’t work πŸ™

    She was doing it on a mac and I am on windows

    You never mentioned which local server you are using, assuming you are using one. Try it with using the local server’s default DB user and pwd. These are what I always use with any of them.

    Here are the Default Database Users and Password for the popular local servers for Windows:

    XAMPP: User: root Pwd: <empty> do not type anything between the single quotes when editing the wp-config.php; but LEAVE the single quotes!

    WAMP: User: root Pwd: <empty> same as above

    MAMP for Windows: User: root Pwd: root

    Uniform Server: User: root Pwd: root

    Cheers!
    Lyle

    Thread Starter a22mu

    (@a22mu)

    Hello, I am using WAMP. I can get into MYphpadmin and have created the database and stuff using root. The problem is connecting the database and the site I think.

    OK, then if you are using WAMP, this is what the wp-config.php file entries should be on your WAMP install:

    Database Name: whatever the db name is; should have no spaces

    User Name: root

    Password: <empty>; will look like this ” <two single quotes>

    Database Host: localhost

    Table Prefix: whatever the existing one is; leave as-is

    Dion

    (@diondesigns)

    Did you give the user access to the database? That must also be done.

    And one should always use 127.0.0.1 for DB_HOST on Windows systems; the Windows versions of MySQL and MariaDB have difficulty resolving localhost and DB access can be very sluggish. (The best DB access method in Windows is via named pipes, but that’s well beyond the scope of this site.)

    Thread Starter a22mu

    (@a22mu)

    I have set my config file like that but it won’t open. I also changed the file to the name of the specific database I have linked with the site and the user but still it doesn’t open. It won’t even connecting through the localhost to the folder that contains it (“localhost/testing123”)

    Thread Starter a22mu

    (@a22mu)

    Yes, the user has access to the database

    Thread Starter a22mu

    (@a22mu)

    The localhost works when I go to just the normal wordpress installation I did but when I try to go to even the folder that contains it for her site it doesn’t open at all and gives me the error

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘How to run wordpress site, files from usb’ is closed to new replies.