• Support
  • Problem with the WP transferred from Web Faction

Hello,

I'm considering migrating my Django+PostGIS sites from Web Faction to Opalstack, but first I tried to migrate one Word Press site. I followed the tutorial on automatic migration from WF and everything went smoothly, except my app is not working.
Instead of the working site I see a content of index.php:

`<?php
/**

  • Front to the WordPress application. This file doesn't do anything, but loads
  • wp-blog-header.php which does and tells WordPress to load the theme.
    *
  • @package WordPress
    */

/**

  • Tells WordPress to load the WordPress theme and output it.
    *
  • @var bool
    */
    define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require DIR . '/wp-blog-header.php';`

While inspecting error.log I found the following error:

2020/11/02 20:01:00 [error] 217293#217293: *589777 connect() failed (111: Connection refused) while connecting to upstream, client: 213.91.72.107, server: arbormagna.opalstacked.com, request: "GET / HTTP/1.1", upstream: "http://[::1]:81/", host: "arbormagna.opalstacked.com"

I didn't migrate domains yet and wanted to test it with opalstacked subdomain instead.

I am out of ideas about what could be a problem, could anybody help, please? Thanks

  • sean replied to this.

    arbormagna Check your .htaccess file and remove any PHP SetHandler or AddHandler directives you find there. Once that's done your site will begin working.

    The migrator should have showed a warning message about this when you ran the simulate step.

    Thanks @sean for your answer. I didn't find.htaccessfile in my app root directory, nor there was one on Web Faction original location either. That could be the reason why there were no warnings in a simulate step.

    However, I made .htaccess file inside the app root and pasted this code (as per your advice):

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    but still nothing has changed.

    • sean replied to this.

      arbormagna hmm not sure why this was necessary, but I've added our own PHP handler to your .htaccess and your site is now working.

      If you create a new WP app and notice this again then please let us know.

      Thank you very much @sean for your quick help. I really appreciate it.
      The site is now working (partially), and there are some possibly strange things going on that could give you a clue about what is the problem.

      I can access the admin site only by adding /wp-login.php/ to the end of sites URL (this should be accomplished by adding /wp-admin/ also). Then, I get redirected to the admin under the original domain which is still pointing to WF server (maybe this problem is connected to the fact that I still have original domains not migrated?).

      However, when I try to add only /wp-admin/ or anything else arbitrary, like /login/, /admin/ or /whatever/ to the arbormagna.opalstacked.com subdomain, it doesn't give me 404, but rather stays on index page but with "URL+/whatever/" in address bar (e.g. http://arbormagna.opalstacked.com/admin/whatever/).

      I am not much in WP or PHP, just using it for the "lite" sites, so this behavior is really strange to me, but I suspect it has to do with redirections and/or maybe with original domains?

      • sean replied to this.

        sean
        As you are all probably overwhelmed by WF migrants these days I tried to find a solution myself before posting a support ticket and it seems that I succeded.
        I changed siteurland homerecords to opalstacked.com subdomain directly in the database, and then updated URLs in the WP admin, and now it looks that everything is working smoothly.
        Thank you very much for your assistance with this.

        Mastodon