Title: goranpro's Replies | WordPress.org

---

# goranpro

  [  ](https://wordpress.org/support/users/goranpro/)

 *   [Profile](https://wordpress.org/support/users/goranpro/)
 *   [Topics Started](https://wordpress.org/support/users/goranpro/topics/)
 *   [Replies Created](https://wordpress.org/support/users/goranpro/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/goranpro/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/goranpro/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/goranpro/engagements/)
 *   [Favorites](https://wordpress.org/support/users/goranpro/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/goranpro/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/goranpro/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Autorename not working](https://wordpress.org/support/topic/autorename-not-working/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/autorename-not-working/#post-10908397)
 * I did some further testing. Maybe it has to do with the PHP version because if
   I move the site on the same server that runs on PHP 5.6.38 it works. But when
   i move the site to the server that runs on PHP 7.2.12 it is not working. I even
   tried to do some “echo” in the “mfrh_new_filename” filter and nothing is printed
   to the screen(on PHP 5.6 the string is prined near the image name by every image
   in Media Library).
    -  This reply was modified 7 years, 6 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Autorename not working](https://wordpress.org/support/topic/autorename-not-working/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/autorename-not-working/#post-10908370)
 * Hi,
 * this is a screenshot from my Media Library:
    [https://ibb.co/dtwjLV](https://ibb.co/dtwjLV)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Autorename not working](https://wordpress.org/support/topic/autorename-not-working/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/autorename-not-working/#post-10903114)
 * Hi,
 * no, they are not locked (you cann see from the image).
    I also tried to press
   the “Unlock All”. Still the same. I also tried to manually lock an image and 
   then unlock it (still no autorename option) by image.
    -  This reply was modified 7 years, 6 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Increase the speed](https://wordpress.org/support/topic/increase-the-speed/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/increase-the-speed/#post-10889418)
 * Ok, some more explanation….
 * I achieved this speed by:
    1) Crating an index on “meta_value” column and then
   explicitely using it in SQL: SELECT * FROM wp_postmeta USE INDEX (meta_value)
   WHERE…. 2) And Removing the TRIM from SQL = speed 0.0008 seconds
 * …with index and without removing the TRIM speed: 1.8135 seconds.
 * So why is there a TRIM function in this SQL? …can I safely remove it?
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Increase the speed](https://wordpress.org/support/topic/increase-the-speed/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/increase-the-speed/#post-10889174)
 * Hi,
 * I further debugged this and found out that if I remove the TRIM functions the
   SQL executes in 0.0008 seconds (compared to 10 seconds with TRIM)! Why is there
   a TRIM function in this SQL? …can I safely remove it?
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Should mfrh_new_filename return deterministic values?](https://wordpress.org/support/topic/should-mfrh_new_filename-return-deterministic-values/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/should-mfrh_new_filename-return-deterministic-values/#post-10879678)
 * Hi,
 * sure you can but I think i found some erros in it.
 * First is that if I use the $old variable for seed (i was thinking that this is
   always the original file name but its not) the “Auto Rename” is still there. 
   So I had to use the $new variable for seed and then the “Auto Rename” is gone
   from the Media Library after I run the bulk rename. (im still not sure what those
   variables hold)
 * And the second thing is that im not sure if the “dash” rule applies in general
   for Woocommerce or if it is unique for my setup of products…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Increase the speed](https://wordpress.org/support/topic/increase-the-speed/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/increase-the-speed/#post-10873369)
 * Hi,
 * did you maybe already had a time to look into this. This long processing times
   are killing me 🙂
 * Do you think I could just remove the “meta_key <> ‘_original_filename'” string
   from the update if my plan is to run only the bulk rename and only one time?
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Should mfrh_new_filename return deterministic values?](https://wordpress.org/support/topic/should-mfrh_new_filename-return-deterministic-values/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/should-mfrh_new_filename-return-deterministic-values/#post-10873342)
 * Hi,
 * I made it realy simple taking the old filename and adding a hardcoded string 
   to it. This is important to me because I want to be able to change this string
   to produce a different filename if needed. As I only need this for Woocommerce
   images that are formated in a way where the first part of the image name(seperated
   by dash) is a product/variable name, I only changed the second part of the filename.
 *     ```
       add_filter( 'mfrh_new_filename', 'my_filter_filename', 10, 3 );
       function my_filter_filename( $new, $old, $post ) {
         $dashCount = substr_count($old, "-");
         if ($dashCount == 1){
           $filenameArray = explode("-", $old);
           $firstPart = $filenameArray[0];
           $hashSeed = $old."ABC"; //deterministic seed
           $randCharHash = substr(sha1($hashSeed),17,6);
   
           return $firstPart."-".$randCharHash;
         }else{
       	  return $old;
         }
       }
       ```
   
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media File Renamer: Rename for better SEO (AI-Powered)] Increase the speed](https://wordpress.org/support/topic/increase-the-speed/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/increase-the-speed/#post-10841660)
 * Hi,
 * I tried to debug this and found that the most problematic update that takes 10
   seconds per image is:
    `UPDATE wp_postmeta SET meta_value = 'https://www.domain.
   com/de/wp-content/uploads/2018/06/10754-e5ac98-600x600.jpg' WHERE meta_key <>'
   _original_filename' AND (TRIM(meta_value) = 'https://www.domain.com/de/wp-content/
   uploads/2018/06/10754-0c3a60-600x600.jpg' OR TRIM(meta_value) = 'https://www.
   domain.com/de/wp-content/uploads/2018/06/10754-0c3a60-600x600.jpg' )`
 * I wanted to know if the problem is the update or the select condition that is
   inside this update, so i wrote this update as select:
    `SELECT * FROM wp_postmeta
   WHERE meta_key <> '_original_filename' AND (TRIM(meta_value) = 'https://www.domain.
   com/de/wp-content/uploads/2018/06/10754-0c3a60-600x600.jpg' OR TRIM(meta_value)
   = 'https://www.domain.com/de/wp-content/uploads/2018/06/10754-0c3a60-600x600.
   jpg' )`
 * The result is 10 seconds. So the problem is finding what to update, rather than
   updating.
 * Now i tried to remove the meta_key <> ‘_original_filename’ part. This made the
   select execute in 1 second (10x improvement). So i tried to write the select 
   in a way where i moved this part into the HAVING at the end:
    `SELECT * FROM 
   wp_postmeta WHERE (TRIM(meta_value) = 'https://www.domain.com/de/wp-content/uploads/
   2018/06/10754-0c3a60-600x600.jpg' OR TRIM(meta_value) = 'https://www.domain.com/
   de/wp-content/uploads/2018/06/10754-0c3a60-600x600.jpg' ) HAVING meta_key <> '
   _original_filename'`
 * This code also executes in 1 second.
 * I dont know if this code is correct as all selects always return an empty recordset
   in my case and i dont know what this update is supposed to do. Can you please
   take a look?
    -  This reply was modified 7 years, 7 months ago by [goranpro](https://wordpress.org/support/users/goranpro/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] REST API get all products](https://wordpress.org/support/topic/rest-api-get-all-products/)
 *  Thread Starter [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/rest-api-get-all-products/#post-10416407)
 * Thanks, could you please write the exact function that i should use? There are
   instructions on that link but im not skilled in this type od WP codding so im
   a bit lost.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Popular Posts] Default Thumbnail Won’t Upload](https://wordpress.org/support/topic/default-thumbnail-wont-upload/)
 *  [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/default-thumbnail-wont-upload/#post-9006672)
 * I have the same problem. Any news?
    If you dont find a solution, could you make
   the plugin so that it takes the default thumbnail from the theme folder if its
   there, so that it wont be overriten when we update?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Fix translation on action links and logout link](https://wordpress.org/support/topic/fix-translation-on-action-links-and-logout-link/)
 *  [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [10 years ago](https://wordpress.org/support/topic/fix-translation-on-action-links-and-logout-link/#post-6923375)
 * Ok, i found the solution. I think its a BUG in code.
    If anyone is interested,
   you can find it here:
 * [https://wordpress.org/support/topic/plugin-theme-my-login-language-mixed-german-english?replies=14](https://wordpress.org/support/topic/plugin-theme-my-login-language-mixed-german-english?replies=14)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Fix translation on action links and logout link](https://wordpress.org/support/topic/fix-translation-on-action-links-and-logout-link/)
 *  [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [10 years ago](https://wordpress.org/support/topic/fix-translation-on-action-links-and-logout-link/#post-6923374)
 * Hmm, any idea how to fix this? Im unable to translate.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Translating Theme My Login](https://wordpress.org/support/topic/translating-theme-my-login/)
 *  [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-my-login/page/3/#post-6200595)
 * I manually transtated and I have the same problem with “Register”, “Lost Password”
   not being translated.
 * Richpav, did you managed to solve the proglem?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Forms not sending with Super Cache enabled?](https://wordpress.org/support/topic/plugin-contact-form-7-forms-not-sending-with-super-cache-enabled/)
 *  [goranpro](https://wordpress.org/support/users/goranpro/)
 * (@goranpro)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-contact-form-7-forms-not-sending-with-super-cache-enabled/#post-2629345)
 * I think that there should be clear instructions in FAQ about how to handle this
   with the most common cache plugins (WP Total/Cuper Cache). If there is somehow
   possible it would be best to disable the caching with DONOTCACHEPAGE like Donncha
   mentioned.
 * Im quite sure that there are a lot of people that are not aware of this problem
   and their client emails are not getting delivered. I use the plugin for purchase
   requests on one of our real estate stites ([brunarice.org](http://www.brunarice.org/zahtevajte-ponudbe/))
   and we lost a quite a bit in sales before one of our clients reported this(i 
   took 1-2 months to realize this).

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/goranpro/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/goranpro/replies/page/2/?output_format=md)