• kicia

    (@kicia)


    Hello,

    I have a two-themes wordpress website. First theme is for one of the pages (blog page), the second one is for all the other pages, including home page.

    I was trying to change site title selflink in the blog theme (wanted it to link to itself, not to the home page), I was looking for a clue in a WP Codex.

    I pasted this in functions.php of the blog theme ( https://codex.www.ads-software.com/Changing_The_Site_URL )

    update_option('siteurl','https://example.com');
    update_option('home','https://example.com');

    changing examples to my home and blog urls. And the site disappeared, I have 404 error trying to login to wp admin and totally messed up site on every page, both themes. The blog theme looks worse, but the other one is also broken. The admin page doesn’t load at all, when I try to enter it I see a broken home page and error 404.

    I immediately deleted these two lines from functions.php in file editor, but it didn’t get better, deleting these lines didn’t cause any improvement.

    Seems like adding these lines caused modifications in other wp files, but I have no idea where to look for a solution, just don’t know what to do now.

    Colud you please help me?

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter kicia

    (@kicia)

    ok, so functions.php withoud those lines and simple deleting lightbox gallery folder from ftp?

    jack randall

    (@theotherlebowski)

    try it, getting rid of that plugin is a good idea anyway as it’s so out of date it can’t be helping your site any!

    Thread Starter kicia

    (@kicia)

    such a shame, I like lightbox so much ??

    thank you for your advices, I’ll try with it.
    if it won’t work, I’m gonna run another wordpress copy and install it from the start, using my backup files.

    anyhow I can’t understand, how this code could eventually react with lightbox gallery plugin.

    jack randall

    (@theotherlebowski)

    that’s the thing, it may not be the code reacting with lightbox gallery but if you take it and get rid of lightbox gallery too then you know that one or other of them was the problem. my money is on the lightbox gallery plugin being the issue (it can still be a problem if you’ve only deactivated it).

    if making these two changes works, you can add the two lines of code back into the functions.php file and see if it works.

    it’s a process of elimination; remove and add things into the mix until you hit on the problem code! it’s fun if you’re nerd, believe me ?? if i don’t reply for a while i’m going to be away from my computer while i head out for food. i’ll check back when i get back.

    good luck ??

    Thread Starter kicia

    (@kicia)

    thank you ??
    i’m leaving my desk now, it’s late evening in my time zone ??

    i’ll do it tomorrow and give you an info.

    Thread Starter kicia

    (@kicia)

    ok, I’m done with it.
    woke up this morning and just pasted back these two php lines into functions.php, only giving both addresses set to my main domain.
    and it works perfectly again. so simple ??
    I was really one step from setting wordpress up again from the start.

    thank you anyway, it’s also important to have all the plugins up to date.
    I’ll try to find something newer than the lightbox gallery, although I do like this script.

    greetings

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Site broken while changing functions.php’ is closed to new replies.