Title: Plugin not working as expected on live site, but works on local install
Last modified: July 3, 2021

---

# Plugin not working as expected on live site, but works on local install

 *  Resolved [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/)
 * Hello,
 * I love your plugin thank you for all the work with it.
 * However I have ran into a strange problem, where the plugin works normally when
   I have the site installed locally via Local, but for some reason on the live 
   website it fails to actives and just opens the file directly with no lightbox.
 * I am storing the files on a statis subdomain, but the local install also points
   to those files and there it works. I also tested adding the static subdomain 
   on the CND field, but still no luck.
 * Please let me know if you can help me figure out what is causing this problem.
 * Thank you in advance for your time and help on the matter.
    -  This topic was modified 4 years, 11 months ago by [TheSickle](https://wordpress.org/support/users/thesickle/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-not-working-as-expected-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14622786)
 * You disabled element inspect, right click and view source – under these circumstances
   I can’t help you, sorry.
 * Edit: at least I need to be able to use the element inspector of my browser to
   check what is going on on your site.
    -  This reply was modified 4 years, 11 months ago by [Arno Welzel](https://wordpress.org/support/users/awelzel/).
 *  Thread Starter [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14622914)
 * Yes sorry I will enable them for now totally spaced out on that one 🙂
 *  Plugin Author [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14622955)
 * All I can see is that the images are not recognized at all by the backend.
 * I did a quick test with the source code of your page on my local test server –
   if you set [https://static.domain.example](https://static.domain.example) as 
   CDN url you must also have the images accessible locally using your site URL 
   combined with the remaining URL of the image.
 * Example:
 * Your website is [https://www.domain.example](https://www.domain.example).
 * Your image is [https://static.domain.example/2021/05/some-image.jpg](https://static.domain.example/2021/05/some-image.jpg).
 * The CDN URL is [https://static.domain.example](https://static.domain.example).
 * The image must now also be available at [https://www.domain.example/2021/05/some-image.jpg](https://www.domain.example/2021/05/some-image.jpg)
   to be recognized as valid image. However this is not the case on your site. You
   server images from a static domain but they are not available at the same URL
   from the real domain. Even adding /wp-content/uploads would not work.
 * It looks like you don’t have any image available on the real domain at all.
 * I don’t know your exact setup – but the problem is caused by the fact, that the
   images are only visible on the static domain but not on the real domain.
 * For example see my test page:
 * [https://wordpress-demo.arnowelzel.de/lightbox-with-photoswipe/](https://wordpress-demo.arnowelzel.de/lightbox-with-photoswipe/)
 * The images are served using JetPack but are also available on the site:
 * CDN URL: [https://i1.wp.com/wordpress-demo.arnowelzel.de/wp-content/uploads/2019/01/Berlin-2017-01-29-10.jpg?ssl=1](https://i1.wp.com/wordpress-demo.arnowelzel.de/wp-content/uploads/2019/01/Berlin-2017-01-29-10.jpg?ssl=1)
 * Site URL of the same image: [https://wordpress-demo.arnowelzel.de/wp-content/uploads/2019/01/Berlin-2017-01-29-10.jpg](https://wordpress-demo.arnowelzel.de/wp-content/uploads/2019/01/Berlin-2017-01-29-10.jpg)
 * So what Lightbox with Photoswipe does: it will replace the CDN part “[https://i1.wp.com/wordpress-demo.arnowelzel.de&#8221](https://i1.wp.com/wordpress-demo.arnowelzel.de&#8221);
   with the real domain “[https://wordpress-demo.arnowelzel.de&#8221](https://wordpress-demo.arnowelzel.de&#8221);
   and then check if the image is available. I hope you get the idea.
 *  Thread Starter [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14622997)
 * Yes thank you! You have validated my suspicions, I will dig more into this one
   I have a clue now where to troubleshoot.
 * The images are served from a subdomain indeed, the strange part is that an exact
   mirror of the site locally still points to the static domain for the pictures,
   but the plugin works with no issues.
 * However the solution is to remove the forwarding and update the database path
   of all images to point to the main domain. I will try to find a workaround and
   will post if I do, if not at least we know now this setup does not agree completely
   with the plugin.
 * Thank you very much for the time and help on the matter.
 *  Thread Starter [TheSickle](https://wordpress.org/support/users/thesickle/)
 * (@thesickle)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14623073)
 * Removing the static domain removed the problem and everything works perfect.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin not working as expected on live site, but works on local install’
is closed to new replies.

 * ![](https://ps.w.org/lightbox-photoswipe/assets/icon-256x256.png?rev=2906302)
 * [Lightbox with PhotoSwipe](https://wordpress.org/plugins/lightbox-photoswipe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-photoswipe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-photoswipe/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-photoswipe/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [TheSickle](https://wordpress.org/support/users/thesickle/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-as-expected-5/#post-14623073)
 * Status: resolved