• I create daily backups of a website (files & DB) and I want to be able to use those backups on an internal webserver, for testing various plugins & upgrades before I implement changes to the live website.

    But as per my understanding, WordPress is using hardcoded URL’s in its database, so whenever I click on a link on the internal website, it redirects me to the live website.

    I realize I can search and replace in the database, or maybe use backup/restore plugins, but if at all possible, I would prefer not to mess with the database backup, or install additional plugins to achieve my goal.

    Is there a way to make an existing WordPress website URL agnostic, even though it already has hundreds of links/images/plugins?

    Probably a tall order, but I thought I’d ask anyway.

    Thanks

    • This topic was modified 4 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • I love the idea of a locally hosted site providing content back to the production website via syndication but it’s impractical to use backups to do that which is what I think you’re intention might be.

    There are big differences between the localhost and its environment and a production server that makes moving backups back and forth a real problem.

    And localhost can be a real problem itself as the server shuts down when the local machine is turned off or loses connectivity. I still think it’s worth pursuing though.

    Why don’t you build the localhost, migrate your site to it also, get it running well, and use what you’ve learned there to build on at your production site?

    If you then make changes there, you can learn to copy and paste or recreate those changes to your production website.

    The next step would be to possibly create your new posts there and syndicate those to your production website automatically.

    You’ll want a search and replace plugin to correct the URLs on the localhost.

    https://www.ads-software.com/plugins/better-search-replace/

    You’ll also need a syndication plugin if you decide to create posts on your site to be copied to your production site. This one is a bit dated but I have used it in the past.

    https://www.ads-software.com/plugins/syndicate-out/

    This one is the one I use now to automatically syndicate posts to my own aggregation websites servers now but it does require a lot of configuration to make that seamless and you’ll need RSS Feeds that are configured to provide the full output.

    https://www.ads-software.com/plugins/feedwordpress/

    The above Feed WordPress is fantastic but I’ve been doing this stuff for years and I still manage to mess it up.

    There are other syndication plugins out here including one for multisites in case you need to cross-post on one of those…

    https://www.ads-software.com/plugins/threewp-broadcast/

    Finally, for plugins, pages, and theme items, you’ll need to duplicate those manually as there’s nothing I know of to make that process really smooth but I wouldn’t think you’ll have a great need for that unless you wish to add a lot of pages.

    I encourage you to give the above some thought then try it out as you see fit.

Viewing 1 replies (of 1 total)
  • The topic ‘using the backup of a live website locally’ is closed to new replies.