Hi @moovio
I hope you are doing well today.
You should be able to export list using the cloud version:
https://wpmudev.com/docs/wpmu-dev-plugins/broken-link-checker/#broken-link-list
Kind Regards,
Kris
Thread Starter
Moovio
(@moovio)
Found the export button, but it’s not what I’m looking for 😉
I would like to export a CSV with all links that where found on my website, not only the broken ones.
Could you help me with that?
Hi again @moovio
I pinged our BLC developers if that is possible, and if not can we consider this as a future request. e will post an update here as soon as more information is available.
Kind Regards,
Kris
Hi @moovio
Please try adding following code to the site as a Must Use plugin:
<?php
add_action( 'admin_init', 'wpmudev_blc_export_all_links' );
function wpmudev_blc_export_all_links() {
if ( ! isset( $_GET['page'] ) ) {
return;
}
if ( $_GET['page'] != 'blc_local' ) {
return;
}
if ( ! isset( $_GET['blc_export_links'] ) ) {
return;
}
$links = blc_get_links(
array(
'load_instances' => true,
'load_containers' => true,
'max_results' => 0,
)
);
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="blc-links.csv";');
// open the "output" stream
// see http://www.php.net/manual/en/wrappers.php.php#refsect2-wrappers.php-unknown-unknown-unknown-descriptioq
$f = fopen('php://output', 'w');
foreach ( $links as $link ) {
fputcsv( $f, array( $link->url ), ';' );
}
fclose( $f );
exit();
}
To do that simply:
– create an empty file with a .php extension (e.g. blc-expor-csv.php) in the “/wp-content/mu-plugins” folder of your site’s WordPress install
– paste code into it and save the file.
Then you would want to visit Broken Link Checker page on your site with an additional parameter added to URL like this:
yoursite.com/wp-admin/admin.php?page=blc_local&filter_id=all&blc_export-links=true
Best regards,
Adam
Hi @moovio,
We haven’t heard from you in a while, I’ll go and mark this thread as resolved. Note that you can still reply on this topic.
If you have any additional questions or require further help, please let us know!
Best regards,
Laura