WordPress.org

Ready to get started?Download WordPress

Forums

WP Publication Archive
change url (6 posts)

  1. cptkirkh
    Member
    Posted 2 years ago #

    We needed to change our url from child.domain.com to child1.domain.com. Once we did this we realized that the wp publications archive had absolute links and not relative ones. is there a way to change these all at once i do i need to actually change each one. Thanks.

    http://wordpress.org/extend/plugins/wp-publication-archive/

  2. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    You'll need to go in and change each one ... Publications are handled the same as any other attachment in WordPress (i.e. Images), the URL is hard-coded into the database and needs to be changed if you want to migrate the site from one domain to another.

  3. cptkirkh
    Member
    Posted 2 years ago #

    Ok so how are they set in the DB? What table? i would assume that i could just go in and run a sql update statement to change those links, correct? Thanks

  4. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    All attachments are stored in the wp_posts table with post_type set to "attachment." The GUID for each attachment is set to the original URL when it was inserted - don't change this! GUIDs are meant to be used for identification and shouldn't be changed, they aren't used for permalinks.

    The URLs you want to change are actually in the wp_post_meta table. Whenever you create a new publication in WordPress, you add an absolute URI reference to a custom post type. This reference is stored in a custom meta field for that post - the field is called wpa_upload_doc.

    So just look in your wp_post_meta table for any entry with a key of wpa_upload_doc and change the value to match the new URL.

  5. cptkirkh
    Member
    Posted 2 years ago #

    Eric,
    After making those changes it seems that when a user uploads a pdf and then makes link to it in a post the link doesn't work but old pdf's do. What could be the issue here? Thanks.

  6. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    What exact changes did you make? Walk me through what you did - step by step, what you expected to happen, and what you're currently seeing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic