WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Updates have gone haywire after migrating from sub-domain to primary (2 posts)

  1. Tommy.Gun
    Member
    Posted 1 year ago #

    I've searched the forums, but not found anything exactly like this problem.

    After developing a fully functioning site under a sub-domain, dev.mydomain.com, I moved it to the domain's primary name space, http://www.mydomain.com. I was following various guides on WordPress.org and the web. I have moved WP sites before, although not within the same domain.

    Here's a list of initial steps:

    = DATABASE:
    - Exported the DEV site's database to SQL (using Sequel Pro)
    - Did a search and replace in text editor; replacing the references to:
    "dev.mydomain.com"
    with
    "www.mydomain.com"
    - And then doing the same for any path instances like:
    "/path/to/vhosts/mydomain.com/subdomains/dev/httpdocs/"
    with
    "/path/to/vhosts/mydomain.com/httpdocs/"
    - I then saved the changes and imported the SQL to the new database.

    = FILES:
    - I then did the same two search and replace operations across a local copy of all the sites files.
    - Then I edited the wp-config.php file to use the new database.

    I then fired it up and all appeared to be functioning as expected. But on closer inspection/testing I found that components that use email functionality (Newsletter Sign-up and Contact Form) had stopped working. This isn't why I posting and may or may not be related.

    After finding these problems I immediately tried to update the installed plugins... This is when my problems started to expose themselves.

    When I try to updates any plugin or all available updates, the updates seem to complete without any error. But the plugins are still listed as 'updatable', as if the plugins hadn't been updated at all!!

    I found the plugins on the DEV site had been updated instead!! So something is referencing the DEV sub-domain for some reason. I have re-exported the new database and searched again for and references to 'dev.' or 'dev', but only found a dev.twitter related reference, nothing to do with mydomain. So I also did another search and replace in files, across all the files for either path or URL references. Again, nothing.

    After not finding any references to the DEV sub-domain, I decided I would change the name of the 'wp-content' folder on the DEV sub-domain to 'wp-content.old'. After this I get one of two results:
    1)

    The update process is starting. This process may take a while on some hosts, so please be patient.
    Enabling Maintenance mode…
    Disabling Maintenance mode…
    All updates have been completed.

    2)

    Unable to locate WordPress Content directory (wp-content)

    I get result 1) if I got the the general WP Updates (wp-admin/update-core.php) page, and result 2) if I update an individual plugin from the Plugins (wp-admin/plugins.php) page.

    Before renaming the DEV site's 'wp-content' folder, I found can update the plugins manually by copying the files from the DEV plugins directory after doing the updates, so I know the update is successful, but to the old location?!

    I'm really at a loss. Please help!

    = WordPress Version: 3.4.2
    = CURRENTLY INSTALLED PLUGINS (version):
    - Akismet (2.5.7)
    - Custom Taxonomies Menu Widget (1.2.2)
    - Jetpack by WordPress.com (2.0.4)
    - List Custom Taxonomy Widget (3.0)
    - Ultimate Maintenance Mode (1.4.2)
    - WooCommerce (1.6.6)
    - WordPress Importer (0.6)
    - WordPress SEO (1.3.4.1)
    (All currently activated)

  2. Tommy.Gun
    Member
    Posted 1 year ago #

    SOLVED!

    Eventually, after a long period of head vs. wall activity, I found that I had (with the help of Plesk Panel) created an FTP user for the subdomain.

    So... after migration from the subdomain to the primary domain, the dashboard and I were still using the same FTP account. This account was restricted to the subdomain's directory structure, which is completely separate from the primary domain's!

    Soffice to say I changed the 'home' directory for the FTP user to that of the primary domain ('/httpdocs') and all is right in the world.

    It seems quite simple now, but WP didn't give any hints to the fact that the FTP user wasn't able to access the primary domain's files! I'm not sure WP would be tell without maybe writing a dummy file and testing for it's existence.

    Anyway, fair bit of time spent, let's not repeat this one!

    *sigh*

Topic Closed

This topic has been closed to new replies.

About this Topic