• Hi

    After updating the site last night I checked back on previous posts, as is my usual habit, only to find the audio unplayable – not just on the link I have included here, but further back in time. The only audio that plays correctly are the clips on the post I created yesterday. 🙁

    This has to be something I have done in the last two weeks, and what I think it might be is a change in permalinks. The warning at the top of the permalinks settings page warns about search engine position loss, it doesn’t say anything about affecting media library content so I’m really not sure what’s going on.

    Looking at the URLs for the audio in the media library it is not surprising the files do not work because the permalink 404s. I have checked in the media library and the files are still there with size and date created declared etc, but they won’t play – even directly within my media library.

    In my desperation I altered the permalink settings again, trying to get back to what it was before (which unfortunately I don’t remember). No changes of the permalinks makes any difference whatsoever. The latest post works – the rest do not. This is baffling to me because if this was a permalink problem changing the permalink would wreck my latest post too. 😮

    I understand that plug-ins can affect the media library, but I have not added any new ones recently.

    Please help – this blog has been a labour of love for two years and is entirely based on audio – that is its purpose. I’m really upset about this so I may not have posted all the information you need. Please ask.

    Thanks
    Nicola

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • @nicolasan

    I think there are several things going on here.

    When I try to hit your wav file directly, the server does not deliver it, i.e. :
    [audio src="http://callinghome.net/wp-content/uploads/2019/11/3082wewanttotalk.wav" /]
    Are you saying that you can see this file under this directory when you look on the server ?
    See the 404 on the file :

    View post on imgur.com

    Secondly, the permalinks do not affect your media library.
    The permalinks are for your posts not your media since media is an absolute path.
    However, you may want to take a look at the serialized data being used to store your media as an attachment – this is more difficult. You would need to look at how the data is being store here _wp_attachment_metadata

    I’m not an audio expert, however does the encoding for this file come from the server or from the client ? IMO, wav files are pretty old school :
    https://www.zdnet.com/article/wav-audio-files-are-now-being-used-to-hide-malicious-code/
    and I would investigate converting them all.
    I would encourage you to use a cloud service to store your audio files. It’s better than delivering them from your own server, and it will provide you more options in terms of user options.

    Lastly, if you are concerned about your permalinks, I would upload a default .htaccess file, and then reset them :
    https://www.inmotionhosting.com/support/edu/wordpress/reset-permalinks/

    htaccess

    If you stored your files and created an account in SoundCloud for example, you would give yourself a lot more reach than your website (imo) :
    https://creators.soundcloud.com/guide/videos
    https://help.soundcloud.com/hc/en-us/articles/115003452847-Uploading-requirements
    https://wordpress.com/support/soundcloud-audio-player/

    Thread Starter nicolasan

    (@nicolasan)

    Hi

    Thank you so much for your response.

    Ok, so I’ve looked on the server and found all of the upload directories are empty, apart from the most recent.

    [audio src="http://callinghome.net/wp-content/uploads/2019/11/3082wewanttotalk.wav" /] So that’s empty.

    😞

    That explains why the sound isn’t working. But how have these directories suddenly become empty? They were working two weeks ago. I changed host a few months ago but my old host was still hosting these audio files up until a week or so ago. Is it possible my site was somehow accessing my old host? (DNS was changed months ago)

    I have already approached my new host and was told somewhat frostily that all databases were transferred when I changed to them.

    So now I’m wondering if somebody hacked the server but that doesn’t make sense. Why delete just audio and not the whole thing?

    When I said the files are still there I’m talking about in my media library. It shows the bitrate, size, date created etc. But won’t play as the url points to these now empty directories. Where is the media library getting all of the information if the file is not there?

    Thank you for your recommendations. I wish I had used soundcloud or something similar now, I thought the files would be safer if I hosted them seems I was wrong. But that’s a consideration for later.

    If you could give me your opinion on why the directories are suddenly empty that would be great.

    Nicola

    @nicolasan

    I always encourage my clients to use a cloud service for audio or video files. WordPress does a good job of what it is intended to do. It’s sort of like “use the right tool for the job”.

    Do you have your own backups of all your existing audio files ? If so, that may be a good impetuous to move forward with a different approach.

    For now tho, when you say that you “looked on the server for these files” – I assume you are using the File Manger or FTP to check ?

    As far as your host saying that “the database tables were moved successfully” – that’s great, but the media do not live in the database, they live in a flat file directory on your server, and the database stores the meta data about the file.
    So this is where your media library is getting the info, it’s in the database :
    https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/

    I can’t really comment on how the files could “disappear”. There’s no technical reason for this to occur. If you moved hosted, and it appear that the files had remained active, it could cached (either in your browser or in your router or on a CDN or on a server), or if the files were linked using the IP address, instead of the domain name, I guess that could be possible if there was slow propagation.

    So how to resolve (I assume you don’t have a local back up of the site) ?
    1. Ask your old host if they still have a backup of your site? and if so see if your wav files are in there. You don’t need the db, just the files.
    2. Ask your new host if they have backups, and if so see if your wav files are in there. You don’t need the db, just the files.
    3. If you have all these files locally, you could organize them into the right file structure on your computer, and then upload that directly to your server. Then the path would remain the same. Then you could need to run a search and replace using a serialized method bc the path of your root has probably changed from the old server to the new server. Like this :
    old server :
    /home/servername1/public_html/wp-content/uploads/etc,etc
    to :
    /home/newservername2/public_html/wp-content/uploads/etc,etc

    You would need this tool :
    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Google says you have 383 pages indexed from your site.
    It will be a tough decision for you to make, but the first (easiest) step to make it to find a backup.

    Thread Starter nicolasan

    (@nicolasan)

    Hi

    Once again thank you for your response.

    I think I’m going to take the long-round approach and re-upload the files using a cloud server. Yes I have the files all stashed locally (at least twice), and yes, I do GENERALLY back up. Wouldn’t you know it, I haven’t done so for perhaps six months, which in reality is only a few posts – but given this situation I’m going to rethink and not allow this to happen again.

    So thank you for giving me the information about how many pages Google have cached.

    What I was planning to do was mass archive the affected posts and work through them one post at a time. Until I investigate sound cloud etc, I don’t know how long this will take. Reading between the lines though I think it might be a bad idea to take these posts offline, with it being better that they are there, even with the audio file errors.

    Is this correct? Keep the posts online rather than remove them from Google’s view?

    Again thank you. I think I will contact my hosts again to see if there has been any root access to my domain lately, other than my own. The site is on a shared IP and also has an annoying malware check every so often. Neither of which I am happy about.

    Nicola

    @nicolasan

    Well, I guess so. But you would need to let your users what’s going on.
    You could add a some content to your single-post template to avoid having to manually add it in every post.

    Just as one example, the SoundCloud Pro account is 10 or 15 bucks a month. Personally I would bulk upload all my wav files to the Cloud, then I would download all my posts in XML, then I would edit the XML file and replace the current embed method with the Cloud embed method, then upload the XML back into WordPress.

    This would me much easier and faster than having to edit each post individually.

    Even better would be use WP All Import tool – it’s fantastic :
    https://www.wpallimport.com/bulk-edit-wordpress-data/

    Thread Starter nicolasan

    (@nicolasan)

    Hello

    Thanks again for your helpful post.

    Nicola

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

The topic ‘Audio suddenly not working’ is closed to new replies.