Wordpress Update Strategy

  • Started
  • Last post
  • 19 Responses
  • mg33

    Howdy,

    Looking for some solid advice from those of you have done serious overhauls of WP sites, site migrations, etc.

    I'm at a crossroads with a site that has started to have some code issues. It's looking like older plugins that aren't updated often are conflicting with updated WP versions. That's my guess at least. I wanted to redesign the site anyways, so I'm planning my process and trying to decide between two options.

    1) Setup a new site from scratch with a new install and a new theme. Import posts, custom fields, etc. from current site and go through the process of getting all that sorted out. Part of this update will require converting portfolio post types to blog post types.

    2) Update existing site with new theme, fix all issues and get rid of plugins possibly causing issues. This could be a lot of trial and error to fix, but keeps all my content, database files, images, etc. in the same place with less potential to need a ton of individual updates to 3 years of posts, portfolios, etc.

    Any thoughts on this? Anyone been through this before and have experience on option 1?

  • fadein110

    Yep - sounds like a good plan.
    Or download everything to your local server - database and wordpress/theme files, update Wordpress locally, get it all working on your machine - then import database and upload new files/plugins etc. to live version.
    It's usually quite easy to identify problem plugin by turning one off at a time.

  • fadein110

    Sorry missed 2 different options.
    Depends if client is happy for site to be down for a while.
    I would get it all tip top locally first as this will mean little downtime.

  • imbecile0

    Option 1)

    This used to be exactly my job. It was always easier to start from scratch than to retool, but do what you can to maintain urls for SEO.

  • mg330

    fadein11

    Luckily it's all on my hosting account. I've already set up a new site, set up a fresh database for it, new WP install. I've also copied over the DB for the existing site, but when it's connected to the new WP install, I don't see any of the posts, pages, etc. in the Wordpress install, which is weird.

    Trying to do an import of the WP export XML file, but it's huge so working with hosting provider to increase upload sizes in php.ini, which I can't access.

  • fadein110

    If it's a redesign yes start from scratch and just import content!
    God I really should read posts properly.
    Definitely start from scratch. Thought you were just fixing an existing site.

  • mg330

    imbecile,

    Thanks. That feels like the best option. I'm ditching some plugins anyways, starting fresh feels like the most rational option. I know there are some tricks to converting posts types, urls, images, etc.

    The main thing i really have to think through are the custom fields I've added all over, but within the main theme. When I built this site I wasn't using child themes yet. I know what files to grab the custom fields from, and the HTML for it, but need to really dig into that.

    • there's a plugin for most everything. We would use tools to edit posts after import then remove the plugin to maintain compatibility while reducing vunerabilityimbecile
  • mg330

    And, for reference, this is for my site www.expeditionbureau.com. Been wanting to redesign for a while, and, after a year of not doing the bi-monthly issues, I'm converting all those portfolio posts to blog posts and using them as features. I've started running into code issues, not sure why, but staying up late at night too much in debug mode to figure it out.

  • nocomply0

    Hey mg - I've been in your situation many times.

    I would opt for more of a #2 approach:

    Migrate the entire site to a local development environment (I use MAMP for my local dev environment, but https://serverpress.com/ is also great)

    You can do the migration manually or use one of many backup/migration plugins available (I use BackupBuddy).

    One the site is on your local dev environment, you can start breaking stuff and it doesn't really matter. I'd start by ditching your existing theme and working on a new one with all of your existing data in place. See what breaks and what doesn't.

    If your custom post types were programmed into your old theme (as opposed to declared within a plugin), then you're going to lose the ability to view/edit them as well as display them on your site, but don't worry, they're still in your database and it's pretty easy to get them back. I can provide links if needed.

    Then I would start removing unnecessary plugins to make the site lean and mean.

    When you get the site working well on your local environment, then you can migrate it to your live server.

    Admittedly, this is the more "advanced" option of the two you provided. If this stuff sounds scary to you, maybe stick with option #1 as others had mentioned above. There's nothing wrong with that approach at all. But for me it's the more time-consuming of the two given the tools I use and the workflow I'm comfortable with.

    • Thanks. I'll have to give this some thought. Might hit you up for some more advice.mg33
    • How good are you at figuring out where issues are from running in debug mode?mg33
    • Debug mode can be tricky. A lot of issues that you'll see there don't necessarily need to be fixed for your site to work.nocomply
    • I'm not an expert debugger. It's usually a process of tedious trial and error. Often a plugin or theme file is the culprit.nocomply
  • i_was0

    Sounds good, i'm in

  • mg330

    nocomply,

    Here's a question you might have the answer to.

    - Last night I copied the full current site DB in PHP_MyADmin to a new database. Full duplication.
    - Set up new WP install on a subdomain.
    - Changed config file to point to the copied DB - username, password, DB name.
    - Site was up and running with default WP theme. Nothing but the basic content that's there by default.
    - I DID NOT import an exported WP XML file, because the server is throwing an error because of size issues. The host increased max size for two aspects but still throwing an error.

    In the WP Dashboard, I couldn't find posts, pages, anything from the database. Does connecting to a DB full of posts/pages make them appear in the site, or do you absolutely have to do the export/import from within Wordpress? I guess I expected to open the dashboard and see all the content there.

  • nocomply0

    Sounds weird that you would update the wp-config file to point to a different database, and then still be able to pull up the new site with the default content without any issues. Maybe something didn't save right in the update process of the config file. My guess is that you're not pulling from the newly-copied DB based on what you're describing.

    If your posts are in the DB, you shouldn't need to import them via and XML file to have them appear.

    But the issue you're going to run into doing that is with site URLs. Your original DB has the site and all of it's assets (images) at one URL, while your new site is being hosted at another URL. You'll need to update the URLs in the copied DB to match the URL where your dev site is at. I use this tool for this process: https://interconnectit.com/produ…

    Also, that original DB you're copying thinks that you have a bunch of plugins installed and activated that aren't going to be there. That may cause some issues too. You can copy over your plugins to avoid that and then deactivate them later.

    • Thanks!mg33
    • the site has plugins not the database - new site will ignore plugin database entries if plugins are not installed.fadein11
    • Fadein11 is right, but if some of your plugins provide critical functionality to the website, it will be gone. That's what I was referring to.nocomply
  • fadein110

    There is a great plugin for assigning posts or custom posts to different custom posts or post categories - sounds like you may be having issues with importing to a different post structure / taxonomy. I recently had to do this on a big corporate site - redesigned totally - but had to import 3 different post types into new theme/database etc. I will look for the plugin name now.

    • Thanks! Will look this over, and the plugin.mg33
  • fadein110
  • mg330

    nocomply,

    Based on what I did, and considering that the site is obviously working because I'm not getting a DB error, shouldn't I be able to see the posts and pages in WP Dashboard? That's what's confusing me. None of that content shows up on the site or in Dashboard.

  • nocomply0

    Yeah you're right. You totally *should* be able to see those posts and pages. Though I haven't ever tried what you're doing before, which is to pull in and old DB with a fresh set of system files.

    I wouldn't expect your custom post types or custom taxonomies to appear, but I would expect the basic posts/pages to be present.

    The fact that they're not and that the site functions just fine is what makes me think maybe it isn't pulling from that old DB for some reason, but I wouldn't know why.

    It could be something stupid I'm overlooking. Wouldn't be the 10th time that's happened to me. But I can't think of anything off the bat.

    But remember, that old DB thinks your site is running from a different URL than it actually is. That's going to cause some issues, though I think this is separate from the issue you're currently facing.

    • posts will always import - just use wordpress importer if not comfortable with mySQL... those posts will import - may need to change categories etc after but thfadein11
  • mg330

    Hey guys, here's an update.

    I tried importing the posts XML export file from the old site, to a new test site using Wordpress Importer. This allowed me to not import the whole thing and prevent file size issues.

    However, I got nothing but the following error on pages, or posts:

    Failed to import “About”: Invalid post type <!--[CDATA[page]]-->

    Looking around, it seems like there could be a conflict between the structure of the old theme, and the new theme, and the post types not being in sync.

    Anyone know how to get around this?

  • mg330

    It looks like the old site's theme has all post types as custom post types in Posts. Pages, Portfolios, Posts, Revisions, etc. are all custom for this theme.

    I think that's why it's causing so many issues on the import.

  • imbecile0

    Maybe try using this as your importer to get past your custom field errors.

    https://wordpress.org/plugins/wp…

  • mg331

    Problem solved :) Even reached out to the WP forums to see what was happening.

    In the end, the PHPMyAdmin method worked, but my table prefix wasn't in sync with the prefix of the database I moved. It's all working now; didn't have to use the WP Export / Import.

    Now need to look into converting post types.