• I recently did an upgrade of a site from 2.7 to 3.0.4 and am having some problems with a couple of the plug-ins. I have a backup of the files and database locally, and I want to get the (pre-upgrade) site running locally so that I can compare the two. But I’m running into problems.

    When I type in the url, the browser diverts to whatever was the last url loaded: the page doesn’t load, nor do I get an error message. However, it does download a text file.

    If I attempt to go to localhost:8888/mysite, it downloads a file called mysite, which contains the following:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp/wp-blog-header.php');
    ?>

    The site actually resides in the wp folder, so I also attempted using localhost:8888/mysite/wp. This downloads a file called wp, which contains this:
    http://wordpress.pastebin.com/aYpBxLRj

    A couple of things to note:
    -I’m new to this site; whoever built it built a theme based on Sandbox. Getting the theme to work in 3.0.4 was problematic.

    -It is possible that a developer either created a custom plug-in or made modifications to a plugin called community_events. I’m not entirely sure that the plugin installed is actually the community_events plugin that is currently listed in the wordpress plugins list, as that plugin is apparently quite new. This plugin created a couple of database in addition to mysite_wp.

    -I cannot say with any confidence that no core files were modified, since I didn’t do the previous custom development, and I’m a designer, not a programmer.

    -The site is set up with a symlink (sp?) to run the site from the wp folder while the current files are in the wp2.7 folder…or something like that…symlinks are something I never heard of until yesterday so I don’t know anything about it.

    I am on a Macbook Pro running OSX 10.6.6, with MAMP v.1.8.4 running php 5.2.11. I also tried switching MAMP to PHP 4 but that made no difference.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The file you’ve indicated that’s downloading is the index.php file. If your localhost is downloading the file (instead of parsing the PHP and running the site) then you have an odd configuration setting in your localhost setup. it could be several things that are causing the issue.

    if your backup is of 2.7.x, then make sure the files in your localhost setup are the same. Open up the SQL backup (assuming that’s what you’re using) and be sure that the “siturl” and “home” alues in the wp_options table are pointing to your localhost location, not the live site. Then import it and connect your localhost files to the localhost version.

    If the site is still trying to downlaod the index.php file, then there’s a couple of things – you can rename your .htaccess file – something in the .htaccess could be interfering. For example, on my live server, my host has PHP4 and PHP5 running, so I can choose which version I want to use. 4 runs by default, so I have to pop a bit of code in my .htaccess file to tell the server to run 5. when I bring my site to localhost, I have to remove that bit of code, otherwise it’ll download index.php instead of run it.

    I’ve also noticed – this has only happened to me when running MAMP – if I use a “-” in the name of the directory the site is in, it’ll download. If I rename the directory to use “_” or nothing like that at all, it’ll be fine.

    Other issues could just be the way your localhost is configured. but if it seems to parse other PHP files just fine, then probably the directory name or .htaccess is at fault, in my experience.

    Thread Starter cdragin

    (@cdragin)

    Thanks! That is very helpful. I can now see the home page…but it looks like every other page is an absolute reference (including the admin page), so none of the links work. I tried to do a Find All (using TextWrangler) but it crashed the program…I think it’s a bigger file than it can handle. Is there a way to do a search and replace using ssh?

    Really appreciate your help.

    Thread Starter cdragin

    (@cdragin)

    Two other thoughts occur to me:

    -The site uses the Redirection plugin, which I have found to be problematic in the past.

    -Could it be something to do with the symlink?

    FYI, I have other sites running on MAMP so I know that that configuration does work.

    Have you tried disabling all of the plugins? I know you can’t get into the back-end, but if you move the plugins file, then it should have some effect (if the plugins are what’s causing it). Just move the plugins, and if you can get in, then you’ll know it’s one of them. Add them back in one at a time and see which one is the culprit 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with local installation’ is closed to new replies.