• Hi,

    I have a website that works fine online but when I move it onto localhost (MAMP) following these steps (https://www.webnots.com/how-to-move-live-wordpress-site-to-localhost/) all I get is a whitescreen. The site is inside a subfolder in localhost. I don’t know if that might have something to do with the problem.

    Any help would be greatly appreciated as I am quite new to WordPress. I have been trying different things I have read online and nothing has worked. All I get is the whitescreen.

    Thanks in advance.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Did you try accessing you localhost install by appending the subfolder name?
    like:
    https://localhost/subfolder/

    If the files are in a subfolder in localhost directory, accessing
    https://localhost and can indeed throw a whitescreen. However, now I think it should ‘list’ your folders under localhost. But the MAMP configuration can prevent this behavior.

    I am dont have any experience with MAMP, but make sure that there are no
    unnecessary subfolders and try again.

    If you are seeing a white screen, that means there is some sort of error.

    You can look at the errors by enabling WP_DEBUG in your wp-config.php file, or by checking in the PHP error log.

    How did you move the site to your localhost environment? Did you use a migration script like Duplicator, or did you just copy stuff to your computer?

    Thread Starter blasbray

    (@blasbray)

    I had already enabled WP_DEBUG and I don’t get any messages on the Firebug console.

    I didn’t use a migration script, I just copied it onto my computer.

    The site is inside a folder for another site and they use the same database. On the live version it works perfectly but on localhost something seems to be wrong.

    Thanks for helping me.

    Hi,

    If your site is in you document_root and you are using a copy of your live database, you can use wp-cli to fix some links inside your localhost database.

    wp search-replace 'https://example.dev' 'https://localhost'

    Take a look here ~> https://wp-cli.org/commands/search-replace/

    When you enable WP_DEBUG, you’ll see error messages on the browser or in a file called debug.log in wp-content. They don’t show up in the firebug console, since they are server-side error messages.

    Make sure that you set all of the following:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', true );  // will show errors in web browser
    Thread Starter blasbray

    (@blasbray)

    I get the following messages on the browser:

    nsIJSON.encode está desaprobado. Use JSON.stringify en su lugar. overlay.js:46:72
    TypeError: setTabValue only accepts string values SessionStore.jsm:2049:1
    [Exception… “[JavaScript Error: “setTabValue only accepts string values” {file: “resource:///modules/sessionstore/SessionStore.jsm” line: 2049}]'[JavaScript Error: “setTabValue only accepts string values” {file: “resource:///modules/sessionstore/SessionStore.jsm” line: 2049}]’ when calling method: [nsISessionStore::setTabValue]” nsresult: “0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)” location: “JS frame :: chrome://alexastatusbar/content/overlay.js :: AlexaSparkline.logStautsCode :: line 59” data: yes] tabbrowser.xml:505:0
    La codificación de caracteres del documento HTML no ha sido declarada. El documento se mostrará con texto “basura” en algunas configuraciones de navegador si el documento contiene caracteres externos al rango US-ASCII. La codificación de caracteres de la página debe ser declarada en el documento o en el protocolo de transferencia. test
    nsIJSON.decode está desaprobado. Use JSON.parse en su lugar. overlay.js:72:23
    nsIJSON.encode está desaprobado. Use JSON.stringify en su lugar. overlay.js:77:76

    Do you know what I need to do? Thanks again for your help.

    Thread Starter blasbray

    (@blasbray)

    The coding of characters in the HTML document has not been declared. The document will show with “junk” text in some configurations of the browser if the document contains external characters of the US-ASCII range. The coding of the characters of the page must be declared in the document or in the transference protocol. test
    nsIJSON.decode is disapproved. Use JSON.parse instead.

    That would be the translation from “La codificación” until the first “está desaprobado”.

    Thank you.

    Do you see anything in your debug.log file?

    If you do a “view source” on your page, do you see any HTML, or just these error messages?

    Thread Starter blasbray

    (@blasbray)

    I only see the number 1 if I do view source (view-source:https://localhost/brays.es/test/test/).

    I am afraid I don’t know how to look at my debug.log file. Sorry. What would I need to do?

    Thanks for your time.

    Hmm. Is your theme a one-page javascript theme? That “1” looks like WordPress tried to make some kind of call to the API and did’t get very far.

    Thread Starter blasbray

    (@blasbray)

    The theme I am using is called Porto.

    Thank you for insisting.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘I have moved a website onto localhost (MAMP) and all I ever get is a whitescreen’ is closed to new replies.