The Lucid Manager is created with Wordpress. This system stores the body text of all articles in the wp_posts table in the database. To analyse site structure, we need the following fields:

post_name (slug)

post_content (full text)

post_type (only posts)

post_status (only published posts)

The post type is in most instances either a page or a post, but can also be attachments and so on. The post name (slug) links posts together, and the post content contains the full text of the article in HTML.

Several methods are available to extract the required data from the Wordpress database. The easiest way is to use a plugin such as WP All Export. You can drag-and-drop the required fields or run a SQL query. The second method is to log in to the phpMyAdmin on your cPanel and run the relevant queries.

The third method involves using the RMySQL package to download data from the site directly. You will need to create a new user with limited access rights and open the database to your IP address.

The first step reads the data from the database and selects all published posts. The credentials are read from the dbconnect.R file, so I don't publish sensitive data on this website. The table names will be different if you use a Wordpress network. Thanks to 'phaskat' on the Wordpress StackExchange for helping with the queries. Please note that when using a Wordpress network (as I do), you will need to replace the wp prefix in the table name with the relevant string.

Download from GitHub