• I am a newbie to wp.
    I applied a theme written for the latest version of wp to an older version of wp. so i got the undefined function wp_get_theme() error.

    This then blocked me from my access wp as admin

    I google the function name to learn this is a new function only in the latest version.

    So this is how i was able to upgrade without admin access.

    Using ftp, I copied all the files from the default theme twenty ten

    /www/wp/wp-content/themes/twentyten

    into my theme that was created only for the latest version of wp.

    /www/wp/wp-content/themes/wp-foundation

    this then allowed me to then log in as admin and upgrade by clicking the upgrade button. After the easy upgrade.

    I then restored the original wp-foundation theme files back to the folder and then logged in as admin and switched back my new theme that works great with the latest wp version.

    hope this helps someone.

Viewing 10 replies - 1 through 10 (of 10 total)
  • ALl you need to do is rename the theme that is not working. ie – wp-foundationOLD

    renaming the theme automatically switches your site to using 2011 theme (or whatever theme is currently WP default)

    This allows you back in – similar idea, but probably quicker / less hassle

    Thread Starter hcscaladmin

    (@hcscaladmin)

    Well that is what i read, so i tried that and it did not work.

    i also moved it and deleted it.

    go figure?

    That is pretty strange!

    After renaming/deleting/moving, did you visit your admin panel directly?

    like visiting the URL domain.com/wp-admin ?

    If I’m not mistaken, after deleting the theme, the act of visiting your admin is what triggers the reset to 2011 theme

    I thought that visiting any page on the site triggered a reset.

    @s_ha_dum — that could quite honestly be true…. I believe my information comes from an old source…. and may not have been accurate even then….

    🙂 I guess I have never specifically investigated it, honestly. I just have that impression… somehow, which, as we all know, is very scientific and quite reliable.

    I am having the same issue.

    How did you upgrade by getting around that error message. i cant even figure out how to log in. you used an ftp? can you give me more details?

    Thread Starter hcscaladmin

    (@hcscaladmin)

    the goal is first to switch to the default theme. Upgrading is secondary that.

    I am hosting word press on our own domain and servers. from wordpress.org

    So yes you would have to have be using this kind of install to do what i am saying.

    ftp access what not be new to you if you installed it this way. since that is how you install. if i remember right. i am a newbie to wp.org and dont know anything about wordpress.com or how it works.

    i am not sure if wordpress.com would throw this error.
    but google switching the theme without admin access

    if you do have ftp access. see my post above wp-foundation was the theme that locked me out.

    i backup up first, and then deleted all the files in my new themes folder and pasted all the files and folders from a theme that works under the old version.

    Thanks Rev. Voodoo, that was fast (especially because it worked back-to-back on two sites!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘This is how i handled the undefined function wp_get_theme() error’ is closed to new replies.