• Resolved 49erdotca

    (@49erdotca)


    Hello,
    I was having trouble accessing my Admin page (see ) and was following the steps on with great difficulty. I first tried the solution of modifying functions.php which didn’t work. So then I tried modifying wp-config.php based on the instructions on the codex page above. The edit didn’t work, so I undid the changes to wp-config.php and uploaded it back via FTP. Now when I try to access my site () I get this message:
    “Fatal error: Call to undefined function wp() in /homepages/34/d313238537/htdocs/49erna/wp-blog-header.php on line 14”. The problem is that my wp-config.php page only has 8 lines of HTML code (not 14!!!).

    How do I fix this???

    Thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • Did you make a backup of the file before editing it? Do you have a recent backup of your complete site? If so, simply replace the corrupted wp-config.php with your backed up one.

    If not, do you know your database host, name, user and password. If so, delete wp-config.php (the required details may actually be in that file). Replace it with wp-config-sample.php from a freshly downloaded WordPress archive and rename it to wp-config.php. Upload to your site and simply visit your site in a browser. Fill in the details, WordPress will tell you the site is already installed but will start to work again. Hopefully πŸ˜‰

    Thread Starter 49erdotca

    (@49erdotca)

    Thank you for this help. I believe that your suggestion will work. I just have one more problem. I run multiple wordpress blogs (total of 4), but there are 7 databases on my server. I have identified the other 3 databases to their blogs (my provider doesn’t show name or date created, just the db #). Apart from wp-config.php, are there any other wordpress files that would indicate the which database number I am looking at?

    Thanks!

    If you can use phpmyadmin at your host, access the database server using that and look at the first row in wp_options for each of the databases. It should contain your site URL.

    Thread Starter 49erdotca

    (@49erdotca)

    Thanks. Slowly making progress.
    I followed the directions on http://codex.wordpress.org/Editing_wp-config.php#Set_Database_Host and got this error message when loading the page now:
    “Parse error: syntax error, unexpected T_LNUMBER in /homepages/34/d313238537/htdocs/49erna/wp-config.php on line 16”

    Trouble is, my new wp-config.php has nothing on line 16??

    Help?

    Take your wp-config file, replace sensitive details like passwords with XXXX and then post it to pastebin.com. Then put the link in here.

    Thread Starter 49erdotca

    (@49erdotca)

    [Link redacted – Please try to avoid publishing any of your database credentials on the internet]

    Are those line numbers actually in the file (they shouldn’t be).

    Thread Starter 49erdotca

    (@49erdotca)

    Yes they are. I copied them numbers off the page https://core.trac.wordpress.org/browser/tags/3.8.1/wp-config-sample.php#L0

    OK, they need to be removed.

    Thread Starter 49erdotca

    (@49erdotca)

    OK removed the line #’s and the problem has been solved regarding wp-config.php.

    I appear to have a problem still of being able to log in because i changed the URI. Where should I play around?

    Phpmyadmin –> wp_options table. Row 1 , siteurl. Row 36 (ish) home.

    Thread Starter 49erdotca

    (@49erdotca)

    Thanks, found it. Row 37 actually πŸ™‚

    Everything there is as it should be (home and site URL are set to the same thing).

    My problem is two-fold though:
    1) I still can’t login via wp-login
    2) The content of the site is there, but all the WordPress formatting is gone

    Help?

    Thanks!

    Thread Starter 49erdotca

    (@49erdotca)

    ALL FIXED. Typo in siteurl.

    Sorry for any hassle!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Modified wp-config.php now blog won't work’ is closed to new replies.