Have you tried doing an SQL query on the database to change all instances of the old URL there?
no i haven’t how do i do that?
I know how to do it in phpMyAdmin, so the first step is to make sure you have access to your database through that. I have the queries saved on my other computer and I’m away from home until later tonight, but I’m happy to post them for you once I get there 🙂
I’ve got access to phpMyAdmin and can find my wordpress database, what do i need to do next?
Hi Rezaei12,
I’m seeing popular posts on your list. Also checked your theme’s header and it seems to be catching each post view so there should not be any issues. Can you please turn on views count for a moment so I can see if it’s updating or not?
By the way, my plugin does not store your site’s URL. In fact, WordPress Popular Posts uses bloginfo(‘url’) to output your blog’s URL so changing your domain from non-www to www should not be an issue to my plugin.
May or may not help your issue, but this is what I run when I change a WP site’s URL (copy/paste into the SQL textarea in phpMyAdmin). I use this all the time with no problem whatsoever and don’t see what harm it could do, but since I don’t know all of the specifics of your host/installed plugins/etc., I make no guarantees…use at your own risk!
UPDATE wp_options SET option_value = replace(option_value, 'arashmazinani.com', 'www.arashmazinani.com');
UPDATE wp_posts SET guid = replace(guid, 'arashmazinani.com','www.arashmazinani.com');
UPDATE wp_posts SET post_content = replace(post_content, 'arashmazinani.com', 'www.arashmazinani.com');
I’ve just added for the plugin to show the views as you requested Ikki24 hopefully you’ll be able to see that its not registering views on the account.
I’m going to wait until you reply before i try and run the SQL query justbishop posted. Thanks for both of your help, i’m hoping it’s something that can be easily resolved.
Thanks Rezaei. Indeed, my plugin seems unable to update views.
I tracked down the issue to a WordPress function called admin_url, used by my plugin to update your popular posts cache. Even though you changed your site’s url to http://www.arashmazinani.com, admin_url still outputs http://arashmazinani.com which might be keeping my plugin from communicating with your blog’s admin core.
Anyways, try this:
Open wordpress-popular-posts.php using a text editor such as Notepad or Dreamweaver and find this code:
jQuery.post(‘<?php echo admin_url(‘admin-ajax.php’); ?>’, {action: ‘wpp_update’, token: ‘<?php echo $nonce; ?>’, id: <?php echo $id; ?>});
… and replace it with:
jQuery.post(‘<?php echo bloginfo( ‘url’ ); ?>/wp-admin/admin-ajax.php’, {action: ‘wpp_update’, token: ‘<?php echo $nonce; ?>’, id: <?php echo $id; ?>});
I believe that should do it.
Please let me know the results.
hi i think it’s working now, can you just double check it for me?
thanks for all your help
Yes, it seems to be working now. Did you do anything?
I just followed your instructions above and replaced the code with the new code you wrote, then uploaded the php file and refreshed and it seems to be ok now.
Thanks for the help
Awesome, thanks for the update Rezaei!