Hi,
As we we aware we don't have separate feature for migrating content from wordpress to aem communities, but you can use the feature communities ugc migration GitHub - Adobe-Marketing-Cloud/aem-communities-ugc-migration: AEM Communities UGC Migration Tool .
You have to write a custom connector to convert the data from wordpress to required json format as supported communities ugc migration tool. Please look on to the "Importing UGC into 6.1+ using the import servlet with UI" section on the provided URL.
Note : If in case, if you want to automate feature, you can extend the "GenericUGCImporter.java" and then make connection to wordpress to get the data and convert them into required format and pass the same to importFile(final JsonParser jsonParser, final Resource resource, final ResourceResolver resolver, final SlingHttpServletRequest request) method.
Hope this helps!
Thanks
Prem