php - Adding posts to WP db from another db -
I have ~ 44k lines of database and I want to post each line one so that I can display them in WordPress and Can manage them easily I executed the following code and added it only ~ 21k lines to wp_posts and they stopped. Should I have a way to move the entire DB to wp_posts Any ideas? I also think that it was a runtime description that killed your script. Try: You can also use an existing solution, such as a large amount of data is designed to handle. $ result = $ wpdb-> Get_results ("choose 'wp_doctors' command'` nume` ") ;; Forex Currency (Results as $ $$) {// Create Post Object $ my_post = Array ('post_ title' => gt; $ r-> NME, 'post_ content' = & gt; $ r-> ; Spec. '& Lt; / br & gt; $ r- & gt; Institute.' & Lt; / br & gt; '. $ R- & gt; Judet.' & Lt; / br & gt; $ R- & gt; Localization, 'Post_States' = & gt; 'Publish' 'PostIistor' = & gt; 1, 'Postcard' => Array (8,39)); // Enter the post in the database and return the post id $ post_id = wp_insert_post ($ my_post, $ wp_error); }
ini_set ('max_execution_time', 0); (I think it will not work on shared hosting)
Comments
Post a Comment