1. Home
  2. Knowledge Base
  3. OptimizePress
  4. OptimizePress General
  5. Updating URL After Migrating Site to new URL With the OptimizePress Helper Tool

Updating URL After Migrating Site to new URL With the OptimizePress Helper Tool

If you have changed the URL of your site and see broken images, or some other things not working correctly, there are some steps you can take to fix this. Usually this happens after manually migrating the files and database or using a plugin that does not update the URLs in the database after migrating is completed.

There are other things that can cause this as well such as changing the URL of your site to add or remove the WWW or HTTPS. You will need to do this as well in that case.

Step 1: Deactivate and Re-activate all OptimizePress plugins on your site.

Deactivating all the OptimizePress plugins on your site and then re-activating them. Note that the OP Dashboard should be deactivated last, and activated first as some of our plugins rely on that to work correctly. This can help flush out some cached settings.

Step 2: Clear all Cache

You should also clear the OP3 Cache at the top of the admin area in the toolbar:

If you have other caching enabled you should clear that as well.

Step 3: Download the OptimizePress Helper Tool

Download the zip file here:

Step 4: Install and activate the OP Helper Tool

To install, just go to “Plugins” and “Add new” and choose the upload option. Then select the zip file you just downloaded, and then install the plugin like any other plugin, and then activate it. We won’t go into detail on this guide on how to install plugins as this is common and there are thousands of guides available on how to do this (and videos on YouTube).

Step 5: IMPORTANT: Take a FULL Database backup

You’ll need to take a full database backup of your site just in case you enter wrong information in the helper tool and need to roll it back. Due to many different kind of hosting setups, please refer to your web host on how to backup your database, or use a plugin to do so (there are many plugins for this). Also make sure the backup is good (test by importing to new database if you want).

This plugin does not modify any files in your site, so no files backup is needed, but feel free to take one if you want.

Step 6: Update the URL in the Database Using the Helper Tool

Navigate to “Tools” and click on “OP3 Tools”

You’ll now see a screen like this:

You need to know the exact URL of the old site or the previous URL, as well as the new URL. Getting the old URL can be difficult, but if you have broken image due to this change, you can right click on it and “copy image URL” and you can get the first part of the URL from there.

To get the new URL just navigate to “Settings” and you’ll see it there. You can do this in another tab to make it easier.

Did you take your database backup? If so, then continue. If not, go do it now. OptimizePress will not be responsible for fixing your site if you did not take a backup.

Once you are sure you have a full backup of the database, now you can enter the URLs in the fields under “Tools > OP3 Tools” like you see below. If all looks correct, and you have a good database backup, click “Migrate domain”

Within a short time (few seconds for small sites) you’ll see a message similar to this, showing the number of items that were updated. Of course in this example it found “0” replacements because I did not actually migrate this site.

Now if you go back and clear the OP3 Cache and site cache again, you should see previously broken content load fine.

If you have any questions about this or need further help, please reach out to our team for further guidance.

Updated on August 31, 2023

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
Contact Support