Debug Errors & Connectivity

Let’s see why the connection between the LR plugin and the WP plugin is not working.

Hosting Services

Some hosting services are cheap and/or simply not good and basically, reject too easily requests to WordPress API. Alternatively, you can use one of the hosting services I recommend, here.

1. Are you using the REST protocol?

Before the WP/LR Sync for LR 2.6.0, the plugin was always using XML/RPC, which was not playing well with many hosting services (because of historical security issues in the protocol, even though it has been fixed for a long time now). I recommend you to switch to the latest version of the LR plugin and change the Protocol setting of your Publish Service to REST. Try again, and go to 2 if it is still not working.

If you are really willing to use XML/RPC, have a look here.

2. Is WP-JSON enabled on your install?

Check if /wp-json is available on your install. For example, on my website, this URL is Understanding it is not important, but make sure that the “wplr” string is present somewhere in this. If you can’t find “wplr”, then the WordPress API is disabled on your install, that will not work.

The WordPress API needs the .htaccess to work. Sometimes, WordPress doesn’t do it magically and you need to trigger it. Check your Permalink Settings (/wp-admin/options-permalink.php), check Post Name (as long as it is not Plain), Save Changes. Do what described in the first paragraph again. Does it work better? It is a good practice to use permalinks. If you don’t want to use those permalinks for some reason, check this: StackOverflow.

3. Is the WP/LR Sync plugin really enabled on your WordPress?

Sounds like not a very clever question, but sometimes that might be that the plugin is disabled 🙂 Can you check your Plugins page in WordPress? If not, enable it and try everything again. Also, there are plugins that can disable other plugins or their functions. Please make sure you try to disable all the plugins and test WP/LR Sync alone (such plugin as Plugin Organizer, for example, can do that).

4. Check the URL and your Login/Password

Make sure the WordPress URL you set works. Also, try it with http or https. It’s often an issue.

Also, make sure your login and password are right. They are the ones you are using in your WordPress admin, not for something else.

5. Any process/plugin blocking your admin?

Make sure that the plugin and your website works normally. The plugin might not work properly if:

  • Maintenance Mode is enabled (or using plugins like Coming Soon Page, Maintenance Mode,…)
  • the WP REST API is disabled by a security plugin (for example WP SpamShield and its Disable anti-spam for miscellaneous forms option )
  • you are using a captcha or something similar that restricts the access, for example by using reCAPTCHA
  • the wp-admin not directly accessible (Clef), or through .htaccess, like the screenshot below:

Once you found why it is not working, you need to find an alternative to do what you need. If it is a security plugin or else, you need to check with them how to keep have the WP REST API enabled.

6. Check your PHP Error Logs and your WP/LR Sync Logs

You have to be aware that if any other plugin fails or generate an error during the syncing process, WP/LR Sync will be stopped. Therefore, you need to check your PHP Error Logs to make sure nothing happens during the WP/LR Sync process. Check it before using WP/LR Sync, perform an action (or the specific action which failed) and check it again. Did something happen in between?

Disable all the plugins (except WP/LR Sync) and also disable all the extensions you have chosen for WP/LR Sync. Any error or warning generated by any plugin during the WP/LR Sync process will end up with an error for WP/LR Sync. That’s the way it is.

I had myself issues with plugins such as:

  • Media Library Assistant
  • WP Fastest Cache

Your PHP error logs are made accessible by your hosting service, if you don’t know where they are, the best is to ask them. You can also try to use such a plugin as Error Log Monitor (but they don’t always detect the error file). If you are willing to learn more about checking errors by yourself, check this: Monitor PHP Errors. Be careful, the PHP Error Logs is not the Access Error Logs, they are two different things.

Your PHP error logs are empty? It might not be normal, PHP error logs usually have notices, warnings, and errors. Please make sure the errors are actually being logged. For that, you can edit your functions.php (what is functions.php?) and insert such a line:

error_log( “Hello Error Logs!” );

Then load any page on your website, and check your PHP Error Logs again. If they are empty, it means that they are not working. Contact your hosting service in that case. Don’t forget to remove this line from your functions.php.

Alternatively, you can also have a look at your WPLRSync.log located in your Documents folder, it sometimes contains interesting information.

Did nothing work? Make sure you tried everything above because that covers 99.8% of the issues. I will not be able to give you more advice that what is on this page so the only way is that you give me access to your WordPress. Create credentials with admin access for me, make a backup on your install (just in case) and contact me.

7. Other errors…

  • “AgExportRendition:recordRemotePhotoId: remote ID must be a number or string”: Are you using JetPack? The plugin might cause this. You have to authorize WP/LR through JetPack -> Settings -> Carousel, find WP/LR at the bottom of the page and enable it.
  • “An internal error has occurred: bad argument #1 to ‘?’ (string expected, got nil)”: This means simply that Lightroom receives an empty response from the server. So basically, it doesn’t mean anything, except that the server crashed. You will need to go through the previous points, especially having a look at the PHP Error Logs.

I recommend you to use WPEngine or SiteGround. They are both excellent hosting services and work perfectly with all my plugins.