Hi,
You can add something like this in the functions.php file.
if ( is_admin() && isset($_GET[‘activated’] ) && $pagenow == “themes.php” ) {
global $wpdb;
$sql = “
INSERT INTO $wpdb->posts (
ID ,
post_author ,
post_date ,
post_date_gmt ,
post_content ,
post_title ,
post_excerpt ,
post_status ,
comment_status ,
ping_status ,
post_password ,
post_name ,
to_ping ,
pinged ,
post_modified ,
post_modified_gmt ,
post_content_filtered ,
post_parent ,
guid ,
menu_order ,
post_type ,
post_mime_type ,
comment_count
)
VALUES (
NULL , ‘1’, ‘0000-00-00 00:00:00’, ‘0000-00-00 00:00:00’, ‘aaa’, ‘page-title’, ”, ‘publish’, ‘open’, ‘open’, ”, ‘page-title’, ”, ”, ‘0000-00-00 00:00:00’, ‘0000-00-00 00:00:00’, ”, ‘0’, ”, ‘0’, ‘page’, ”, ‘0’
)
“;
$wpdb->query($sql);
$page_id = $wpdb->insert_id;
$sql = “insert into “. $wpdb->postmeta . “(post_id, meta_key, meta_value) values($page_id, ‘_wp_page_template’, ‘custom-template.php’)”;
$wpdb->query($sql);
}