• Hi,
    I am trying to set up an existing wordpress site on localhost. It is a very old site, running on WordPress 4.2.21 running Nature Shine theme. (I know, it is an old version. I just got this website handed to me today, otherwise I would have updated it way earlier. I want to update, but I am not sure my back-ups would work in case something goes wrong. My reasoning is: if I cannot get it working on localhost, how can I be sure it will work when I reupload it?)

    This is how the live website looks currently: https://imgur.com/a/HROyUNR

    I have downloaded and set up the site in two ways, but encounter issues in both ways:

    <b>Try 1. Duplicator </b>
    I have tried the Duplicator plugin (version 1.2.40)
    The whole process goes smoothly. The only warnings it gives before packing are

      “WordPress Version: ‘4.2.21’”,
      “PHP Open Base Dir: ‘ON'”,
      “PHP is unable to read the following items and they will not be included in the package. (a .procmail file).”

    The install process on localhost works, until it says: login to access the site or something similar, and sends me to:
    http://localhost/lovinglife/wp-login.php
    Here, I cannot login, but the following errors are displayed:

      Warning: Illegal string offset ‘remember’ in <Filepath>\wp-includes\user.php on line 39
      Warning: Cannot assign an empty string to a string offset in <Filepath>\wp-includes\user.php on line 39
      Warning: Illegal string offset ‘user_login’ in <Filepath>\wp-includes\user.php on line 54
      Fatal error: Uncaught Error: Cannot create references to/from string offsets in <Filepath>\wp-includes\user.php:54 Stack trace: #0 <Filepath>\wp-login.php(795): wp_signon(”, ”) #1 {main} thrown in <Filepath>\wp-includes\user.php on line 54

    Going to localhost/SiteName yields the following result: https://imgur.com/a/HROyUNR

    <b>Try 2: Manual.</b>
    I have downloaded all files via FTP and the database separately. Then I set it up with the wp-config file to connect with the database. This yields an even poorer result: https://imgur.com/a/HROyUNR

    I have only built websites previously with a NodeJs backend, so I don’t have much experience figuring the given errors out in php or WordPress recovery.

    According to this post on these forums, the wordpress update might work, but I am really concerned about reuplading my backup in case something goes wrong.
    https://ww.wp.xz.cn/support/topic/admin-page-blank-after-migrating-to-new-server/

    If it goes wrong, and reuploading my backup will yield the same result as on my local host, I would have no idea how to restore the live site quickly. Would anyone of you know for sure if I would be able to reupload my backups of the database and wordpress files to make it work again?

    Or does someone have an alternative fix to get it working on localhost?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter petoodle

    (@petoodle)

    Small remark: I am using Windows 10 with XAMPP to view the localhost site.

    Dion

    (@diondesigns)

    (Is it just me, or is something wrong with the display of this topic?)

    You can fix your problem by either updating WordPress, or by installing a version of XAMPP that uses PHP 5.x.

    Thread Starter petoodle

    (@petoodle)

    Yeah, its not just you there is something weird going on with display of the topic.

    I have now copied it to another domain with no problems, updated wordpress and all the plugins to the latest versions, and tried to do the same thing again to copy it to local host. This time, the user.php errors are gone, but I am still having issues with the display of some images and content:

    View post on imgur.com

    The parts that show okay are made as custom additions to the wordpress site I have heard, so that would explain why they show correctly. Do you have any idea what could cause that?

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

The topic ‘Localhost user.php errors’ is closed to new replies.