need to bulk-NOINDEX 6000 posts via _aioseop_noindex ; doesn't work | Troubleshooting All in One SEO Pack Pro | Support | Semper Plugins

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
need to bulk-NOINDEX 6000 posts via _aioseop_noindex ; doesn't work
March 18, 2016
4:43 pm
Avatar
matt
New Member
Guests
Forum Posts: 2
Member Since:
March 18, 2016
sp_UserOfflineSmall Offline

We need to apply the NOINDEX directive to thousands of wordpress posts. We have the post ID of all the posts; our intent is to set the NOINDEX flag via direct database query, because it is not practical to use the wordpress UI to edit 6000 posts manually to set this flag.

We have seen that the NOINDEX setting is stored in wp_postmeta, meta_key = ‘_aioseop_noindex’, meta_value=’on’. However, setting it via db query does not work. Does the plug-in also set some other value first, for the _aioseop_noindex value to be considered?

We’ve just upgraded to v2.3.2.3 of AIOSP, from 1.6.

When we set the NOINDEX flag via the UI, it works. When we open an old post and submit the wordpress editing form without making any changes, and then run the query below, that works. The system acts as if each post needs to be updated using the current version of the plug-in before direct database manipulation works. That’s why I ask whether the plug-in is setting some other value in addition to the _aioseop_noindex insertion.

Here’s the query we use to set the NOINDEX flag:

  insert into wp_postmeta values (null, 99999, ‘_aioseop_noindex’, ‘on’); # where 99999 is the post ID

March 21, 2016
12:58 pm
Avatar
Michael Torbert
Admin
Forum Posts: 374
Member Since:
October 13, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

March 21, 2016
12:59 pm
Avatar
Michael Torbert
Admin
Forum Posts: 374
Member Since:
October 13, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

March 21, 2016
2:25 pm
Avatar
matt
New Member
Guests
Forum Posts: 2
Member Since:
March 18, 2016
sp_UserOfflineSmall Offline

Michael Torbert said
Hi Matt,

Holy cow that’s an old version. Welcome to the future. 🙂

As far as updating the posts, the following code should work. Just put it in your theme’s functions.php.

Disclaimer: make sure you take a good backup of the database before making any changes, and we always recommend making changes to a test site before a production site.

$args = array( ‘numberposts’ => -1 );
$allposts = get_posts( $args );
foreach ( $allposts as $post ){
setup_postdata($post);
$post_id = get_the_ID();
update_post_meta($post_id, ‘_aioseop_noindex’, ‘on’ );
}

Have you noticed any other issues upgrading from such an old version? Things *should* upgrade well but that was so long ago…

Thanks, Michael.

I don’t understand why we’d put this into Wordpress. We’re not trying to NOINDEX the entire website. Rather, we’re touching only ~6000 of ~30k pages.

I was hoping you’d have some insight into why the current version of the plug-in would ignore the _aioseop_noindex setting in 45% of cases. (As a test, I updated 20 pages via SQL. 55% of them successfully showed the NOINDEX meta tag; 45% did not.) Said another way: what database values does v2.3.2.3 expect to find, that v1.6 might not have created?

March 21, 2016
2:33 pm
Avatar
Michael Torbert
Admin
Forum Posts: 374
Member Since:
October 13, 2011
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

Forum Timezone: America/New_York

Most Users Ever Online: 964

Currently Online: katie
28 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 35

Members: 19453

Moderators: 0

Admins: 8

Forum Stats:

Groups: 4

Forums: 28

Topics: 1873

Posts: 7973

Newest Members:

Marcela Isaza

Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve KlasenArnaud BroesAshish Ravi

[i]
[i]
Skip to toolbar