title: Dynamically setting permalink structure in Wordpress database creates 404
body: <p>It seems like others have experienced similar issues as me in the past on this subject, but nobody has provided a complete answer.</p>
  
  <p>I'm attempting to run a PHP script to update the permalink structure in the <code>wp_options</code> table for a slew of Wordpress blogs. I want to connect to each database and update the permalinks without having to log in to each blog and update the setting through the UI.</p>
  
  <p>I'm successful at connecting to the DB and updating the <code>permalink_structure</code> field with the proper codes, but it causes a 404 when attempting to view any posts.</p>
  
  <p>Is Wordpress updating other tables/fields to fully enable the permalink?? I'm having a hard time finding the complete answer to this.</p>
  
  <p><strong>BTW:</strong> If there are edits being made to the <code>.htaccess</code> when this is done through the Wordpress UI, I'm not seeing it. The htaccess looks unchanged when I do this through the UI.</p>
  
  <p>Thanks!</p>