Title: Export URL gets incorrect path
Last modified: August 24, 2023

---

# Export URL gets incorrect path

 *  Resolved [Mark](https://wordpress.org/support/users/markryderbluesparkcouk/)
 * (@markryderbluesparkcouk)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-url-gets-incorrect-path/)
 * If I try and export pod data, i get the success message like this:
 * **Success:** Your export is ready, you can download it here
 * But the link URL on the ‘here’ shows the path directly on the server, and not
   the path that could be clicked on the website
 * The URL has
 * domain.com/home/mycpanelsitename/public_html/wp-content/uploads/2023/08/pods_export_xxxxx.
   txt
 * What would work would be
 * domain.com/wp-content/uploads/2023/08/pods_export_xxxxx.txt
 * Does anyone have any idea if the path can be adjusted somehow?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-url-gets-incorrect-path/#post-17001281)
 * Hi [@markryderbluesparkcouk](https://wordpress.org/support/users/markryderbluesparkcouk/)
 * I’m not sure I understand what you are doing. Where are you exporting this from?
   I’m not aware of any export to txt functionality within Pods.
 * Cheers, Jory
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-url-gets-incorrect-path/#post-17014462)
 * It’s on [PodsUI.php:2239](https://github.com/pods-framework/pods/blob/a20d6392eea3cc1fa181953e215cc1c262b15100/classes/PodsUI.php#L2238).
 * The error in the file URL is because [PodsMigrate()->save() on lines 883 to 885](https://github.com/pods-framework/pods/blob/a20d6392eea3cc1fa181953e215cc1c262b15100/classes/PodsMigrate.php#L883-L885)
   sometimes returns a URL from GUID and sometimes returns a URL which is actually
   an absolute file path.
 * Ideally the first would use [wp_get_attachment_url()](https://developer.wordpress.org/reference/functions/wp_get_attachment_url/),
   not a GUID, and the second would use [wp_get_upload_dir()](https://developer.wordpress.org/reference/functions/wp_get_upload_dir/)
   to replace `basedir` with `baseurl`.
 * In the short term, replacing `pods/classes/PodsUI.php` line `2238` which reads:
 *     ```wp-block-code
       $this->message( sprintf( __( '<strong>Success:</strong> Your export is ready, you can download it <a href="%s" target="_blank" rel="noopener noreferrer">here</a>', 'pods' ), $export_file ) );
       ```
   
 * With:
 *     ```wp-block-code
       $upload_dir = wp_get_upload_dir();
       $this->message(
       	sprintf(
       		__( '<strong>Success:</strong> Your export is ready, you can download it <a href="%s" target="_blank" rel="noopener noreferrer">here</a>', 'pods' ),
       		str_replace( $upload_dir['basedir'], $upload_dir['baseurl'], $export_file )
       	)
       );
       ```
   
 * …should resolve it.
 * In the long term, an [issue has been filed for tracking resolution: #7144](https://github.com/pods-framework/pods/issues/7144).
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-url-gets-incorrect-path/#post-17032570)
 * Thanks for your research here [@pdclark](https://wordpress.org/support/users/pdclark/)
 * Closing topic here in favor of GitHub. [@markryderbluesparkcouk](https://wordpress.org/support/users/markryderbluesparkcouk/)
   You can follow progress on the [link provided by Paul](https://github.com/pods-framework/pods/issues/7144).
 * Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Export URL gets incorrect path’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)

 * 3 replies
 * 3 participants
 * Last reply from: [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/export-url-gets-incorrect-path/#post-17032570)
 * Status: resolved