• Resolved wooferdog

    (@wooferdog)


    Hi, I’m on step 3 and stuck at changing the URL in the Search & Replace plugin. The description of that plugin suggests that the forward slash at the end of the URL matters:

    https://imgbox.com/DZfG1BTG

    So with this in mind, what is the proper way of changing this url? Do I search with a forward slash at the end, and replace in the same manner?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author RVOLA

    (@rvola)

    Hello @wooferdog
    You can very well do a search without a slash at the end.
    The plug-in tells you, because it can be an error if you do not use it correctly.

    Remember to save your website before doing this.

    If you have a doubt, you can show me what you want to look for and what you want to replace it with.

    Good luck

    Thread Starter wooferdog

    (@wooferdog)

    Hi @rvola,

    Just to confirm, I want to change the URL from the standard:

    (Search)
    https://example.com/wp-content/uploads

    to

    (Replace)
    https://example.com/wp-content/uploads/private

    This will be okay without a forward slash at the end?

    Plugin Author RVOLA

    (@rvola)

    it seems to me correct.
    Remember to save! we are never careful enough

    Thread Starter wooferdog

    (@wooferdog)

    I made a backup and performed the operation, but I have more questions.

    First, I selected all tables, unchecked dry run, then selected ‘Export SQL file with changes’. This didn’t appear to do anything except give me a SQL file? It told me that “13 tables were processed, 336 cells need to be updated”. I don’t know what that means.

    So I went through it a second time, this time choosing ‘Save changes to database’ and got the following message: “The following changes were made to the database: 13 tables were processed. 337 cells need to be updated”.

    Am I done here?

    Afterwards I checked on your plugin, and for some reason my link has been changed to:

    https://example.com/wp-content/uploads/private/private

    Did I do something wrong? I only entered one ‘private’ folder, not two…

    Plugin Author RVOLA

    (@rvola)

    everything is good with Search-Replace

    The changes were also made on the setting of the WP Original Media Path plugin.

    Modify simply by deleting the last private.
    Normally everything is ok at this moment.

    The old images are displayed well and the new ones are in the right folder.

    Thread Starter wooferdog

    (@wooferdog)

    Okay, so my files are in the private folder, I’ve updated the database, and removed the extra ‘private’ subdirectory from your plugin.

    My media files still aren’t showing up in the online Media Library, or in the WordPress app. Is there one last thing I have to do? https://imgbox.com/EdXwg6lk

    Plugin Author RVOLA

    (@rvola)

    If you move the whole file “uploads/” in “uploads/private/” in FTP, it’s ok.

    Then in the setting of the plugin it must be: “https://example.com/wp-content/uploads/private”

    Finally to check that you do not make mistakes in Search-Replace, just see “web address” of a file in the Media admin.
    If the URL displays “https://example.com/wp-content/uploads/private/XXXX” it’s ok.

    Otherwise it means that you have forgotten something.

    Finally to check everything, just send an image and watch or WordPress add it to your FTP.

    Thread Starter wooferdog

    (@wooferdog)

    Hmm I wonder if I messed up earlier by performing two non-dry runs? What exactly is the difference between ‘Export SQL file with changes’ and ‘Save changes to the database’? Did I perform two different operations by running each of them?

    The files exist and the URLs look right, but there’s no preview thumbnails. The WordPress app refreshes but nothing shows up.

    Plugin Author RVOLA

    (@rvola)

    did you disable “dry-run”?
    what is the url when you click on a gray image?

    Thread Starter wooferdog

    (@wooferdog)

    Yeah I disabled dry-run once for the ‘SQL file’, and again to ‘Save changes to the database’.

    The url of one file looks like this:
    https://example.com/wp-content/uploads/private/2019/02/1946856221..jpeg

    Plugin Author RVOLA

    (@rvola)

    weird two points at the end of url.
    Do you see the file in FTP?
    The private folder has a chmod of 755?
    Do not use a .htaccess file that forbids reading the file?

    Thread Starter wooferdog

    (@wooferdog)

    Yeah I thought that was kind of weird too. I may need to explain something after all.

    I came from WordPress.com which had a private mode. It was super easy to set, but it was such a limited experience and my mind was exploding with ideas. Ever since I moved to my own website, I’ve been trying to replicate a private mode that not only prevents access to the site, but also access to the files on it. This website is basically a journal.

    That’s where this ‘private’ folder comes in. I’m using a plugin called Private Uploads. This plugin prevents access to said files. My webhost uses Apache, and so I was required to edit the .htaccess file with the appropriate script found in the installation instructions:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # Block unauthenticated user access to the /private/ uploads folder
    RewriteRule ^wp-content/uploads/(private)/(.*)$ /?pucd-folder=$1&pucd-file=$2 [L]
    </IfModule>

    It works really well too!

    Unfortunately, moving my files over to it has been kind of messy, as you might be able to tell. And I really need some guidance on how to get myself back up and running, because I just feel so lost right now lol. ??

    • This reply was modified 5 years, 8 months ago by wooferdog.
    • This reply was modified 5 years, 8 months ago by Jan Dembowski.
    Plugin Author RVOLA

    (@rvola)

    Hello !
    I do not understand the concept of “Private Uploads” but a priori it should not be used in parallel with “WP Original Media Path”.

    I advise you to disable the plugin: “Private Uploads” and “WP Original Media Path” to move in FTP the contents of the “uploads/private” folder in “uploads”. Clean up the mentions in the htaccess file and restore your database before the transformation.

    Once restored, since the goal is to secure media, I invite you to contact the developer of the extension “Private Uploads” to get support.

    good luck

    Thread Starter wooferdog

    (@wooferdog)

    Okay I restored my database from before using Search and Replace. I will contact that developer and see what I can do.

    I may post here again if I run into any more questions.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Search & Replace URL question’ is closed to new replies.