The wordpress importer / exporter should work for this task (maintaining post dates and comments), but it’s better to test it before deleting the online blog.
My advice is to create first a fresh install in a folder (so you’ll can temporary reach your new installation at www.yoursite/folder/ ) and test if everything works fine importing post to the new location. Just then you can delete the old blog and move your index.php to the root (for detailed explanation on how handle wordpress installation in a folder refer to https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory ).
This way you can test first the migration and then substitute the old blog with the new one when everything is done.
Related Posts:
- WordPress Multisite – Create Default Post and New Category On New Site Install
- How to backup WP blog posts to computer, not new site
- get backup file from wordpress database in x days
- Post restoration
- Restore posts, but only posts that exist in my database backup
- simply loop through posts
- Difference between an archive and a page listing posts
- Post preview mechanism architecture
- Post featured image column on admin post list page
- WordPress Queue like Tumblr?
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- Counting words in a post
- the_post_navigation seems to ignore same category filter
- How to programmatically create posts in wordpress?
- How to avoid duplicate posts on front page?
- Get current users post URL?
- is there a better way of combining this?
- How to output comments number of a post per day?
- Remove some articles from the list in WPAdmin for a user
- Pagination – Posting First Page Content
- get_permalink executes link without https
- How to show featured image in custom post type dashboard post page
- Notification to Admin or Author upon new post [duplicate]
- Displaying a widget only on long posts (over X characters)
- Remove permalink from images when inserting into post
- How to create a load more post entries like Twitter?
- WordPress blog post cloned and stolen?
- What is the Better way to manage posts in WordPress?
- Is there a way to apply WordPress categories at the block level?
- Featured Image uploaded, attached and set but only appearing in the media library
- Insert woocommerce products programmatically with featured image and gallery
- CF7 upload file failing [closed]
- wp-cli post create & media import issues
- Show only one page link in content pagination
- Include sticky posts on the static page front page
- Get attachments for posts that belongs to a specific category
- why are images not full size?
- How can I setup a relationship using categories in WordPress?
- hiding permalink in admin if the user is subscriber
- Anyone know why wordpress converts some html entities to their numeric equivalents?
- Exclude current custom post on single post
- Nested WP_Query breaking loop
- How to make default “Privacy Policy Page” a normal page?
- Changing default WP-Site creation date
- In post.php how can I remove onbeforeunload?
- Custom taxonomy archive page problem
- post__in not working with pre_get_posts, but post__not_in does work
- Query posts and filter at query time by value of custom meta
- Delete post revisions only for a single post
- wp_set_object_terms NOT working on CPT, but wp_set_post_terms does
- Update post meta within save_post action
- tribe_get_start_time displays the current date and time on other post types than tribe_events
- Auto delete posts based on content text
- Count the number of a post types associated with another post type
- How do post IDs work in WordPress?
- Where to insert the other site image url for our wordpress post
- Get Users Post ID
- Hide parts of the post content after typing it’s name or searching it by category
- search content of pages and list in wp-admin
- add_rewrite_rule and template redirect not working
- adding my posts (author posts) in menu
- How to separate each individual blog post?
- Automate post update for all posts?
- Allowing Users to Register Themselves and Post : Does WordPerss Handle these Problems?
- get parent fields title, content excerpt etc
- Changing permalink of WordPress
- Rest API Paginate until all posts are imported
- DEL media from the post but keep my featured image or post
- Group first, 2nd, 3rd, etc posts by category terms
- exclude particular category in api
- wp_trash_post() duplicates post to trash
- Make categories appear random
- Add view to admin menu to filter for specific criteria ( If post is child of specific Parent )
- Create Posts from API response without duplicates
- I want to change the WordPress comments file
- How to find the edit link of the WordPress Post from the URL
- Get posts from category from custom query
- Changing a users posts to drafts upon role change
- Can I Paginate Post after every 25 tag?
- How to show posts ordered by random [duplicate]
- Alternative content between posts no repetition
- Start loop from specific post ID
- Query posts from newest category
- Trim excerpt to first paragraph
- WordPress loop uses unmodified posts array, why?
- Create new post on user registration
- Ajax – Post Categories and Load More
- Skip posts, but keep posts per page
- how to add a facebook page latest posts into my wordpress site
- Displaying categories items among posts
- Display only posts with comments
- Display ONLY Latest Post From Several Categories
- how to show all type of author posts in author page (SOLVED)
- WordPress Page Column Problem [closed]
- If meta_key exists then don’t select this post?
- Is there a block to print post link standalone in a block theme?
- Export Posts Without Categories In An XML File
- Making a private post visitable by link?
- Display content from specific category
- Batch Scanning and Deleting Empty WordPress Posts