0

I have a database of 4000 articles and I need to assign a specific category to all of this articles.

How I can do? If I try by selecting all in the CP and trying to modify them, i get an URI too large error from my webserver.

I also need to assign a single specific author to all 4000 articles.

0

If you can access the database directly, you could

  1. Check for the ID of the category you want to assign
  2. Check for the Author ID

Then run the following MySql (on your own risk):

INSERT INTO `#__term_relationships` ( object_id, term_taxonomy_id )  
SELECT ID, 1 FROM `#__posts` WHERE `post_type` = 'post' // where 1 is your desired category ID

UPDATE `#__posts` SET `post_author` = 2 // desired author ID

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.