• Hello there.

    I am trying to build a local version of a WP site that is actually live. Purpose is to try and build a development and test enviroment.

    Some facts :

    – The local machine is a Ubuntu Server 12.04 LTS running on a VM on a Mac.
    – The apache server and mysql server are up ??
    – The apache server is serving to virtual hosts : local.sander.dev and local.xyz.dev. xyz is the live site.
    – local.sander.dev is a clean, new WP install and is working as should be.
    – local.xyz.dev is a copy of the live site. Copied all files with tar and move it to local machine, un-tar-ed them to the local directory for the local.xyz.dev.
    – local.xyz.dev has a copy of the mysql database of the live enviroment on the local machine.
    – local.xyz.dev is doing NOTHING :). No errors, no pages, not showing anything.

    As the copy of the live site is doing absolutly nothing, i tried a few things :

    – Simple html file works and displays. Apache can see the seperate site and files.
    – Simple php test file works and displays. Apache and Php works, phpinfo shows what is should show. Connecting to a random database works.
    – using the incorrect database in wp-config gives me a database connection error as it should. If i use the correct wp-config settings then nothing displays. even wp-amin login is blank.
    – corrected the wp_options tables in the database to have the correct and new URL for the site… still nada.
    – set all file permissions to 777 and set the ownership of files to the correct apache server user… nada.

    I am stumped atm… Does anyone have a hint where to look next ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you are pulling up blank pages, I would suggest starting with the database. I think you may have copied literally EVERYTHING, meaning the db connections as well. Did you create a second database for local.xyz.dev ?

    Thread Starter saco1970

    (@saco1970)

    Thanks for the response.

    I will check the database one more time and maybe export it again.
    Not sure how to create a new database for the local site but i guess i can try and assign a blan, fresh db to it and see what happens.

    What do you mean by database connections ?

    Thread Starter saco1970

    (@saco1970)

    I tried the local non-working site with a database from the working local.sander.dev but alas… still nothing showing up on the index/starting page.

    I was able to login tho and the admin part of the local.xyz.dev is working but nothing on the content. no errors, no hints, nada.

    ** EDIT ** this is due to the site local.xyz.dev redirecting me to local.sander.dev. Trying to fix the URLS etc in the options. BRB.
    ** EDIT 2** nevermind. Fixing the HOME and URL options in WP_OPTIONS table does not help, still a blank page as wp-admin tries to redirect me.

    Thread Starter saco1970

    (@saco1970)

    Sigh..

    The local.xyz.dev is not even responding to a empty database.

    Can you somehow send me a copy of the db connections? It’s not a must.

    If you take a look you might see that the db connections (username, password, etc) are incorrect.

    I am not an expert, but pulling blank pages sounds like the database to me. To troubleshoot more, check the different PHP files (wp-login.php, etc..).

    OR do a new local install of WordPress, on a fresh new db, and see if that pulls up blank pages.

    I just did that before I wrote this, so I can “follow along” with you.

    Did you check the PHP error logs? Are they throwing errors?

    Enable Debug mode in wordpress and see if any errors show up on screen.
    Debugging in WordPress

    Also, in relation to the URLs inside of wordpress, be sure to look at the URLs in the wp_posts table as well. make sure they are not broken.

    As a final, can you go to the admin section in /wp-admin/? That will usuaully let you know if it’s a db problem, wordpress problem, or general apache/php problem.

    If you can access wp-admin just fine and log in, your wordpress is good and you just need to edit the settings in your Db. If not, it’s probably a problem with Apache/PHP/etc.

    Let me know if any of this helps.

    Thread Starter saco1970

    (@saco1970)

    Thanks for the responses.

    I will try the debugging info when i am at work again.

    The weird thing is that the db connections seem to be correct and still nothing.
    Wp-admin is showing a blank page with the correct logins but it is showing an error page from WP itself when the login / password / db name is incorrect. All Php files from WP are blank or give an php error ( ABSpath) which might be related to required includes etc.
    So WP is doing something as it is checking the DB but it seems it stops after that. PHP or html test files ( with phpinfo etc ) work.

    Fresh and blank WP sites work. I’ll recheck what happens if i let a fresh WP install connect to the old database containing my site.

    I am not that proficent in Apache but will put in some more time in that when at work again.

    Do you have any plugins activated? If so, that might be part of the problem as well. Try deactivating them if necessary.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘local copy of online site is showing blank pages.’ is closed to new replies.