The Entrepreneur Forum | Financial Freedom | Starting a Business | Motivation | Money | Success

Welcome to the only entrepreneur forum dedicated to building life-changing wealth.

Build a Fastlane business. Earn real financial freedom. Join free.

Join over 80,000 entrepreneurs who have rejected the paradigm of mediocrity and said "NO!" to underpaid jobs, ascetic frugality, and suffocating savings rituals— learn how to build a Fastlane business that pays both freedom and lifestyle affluence.

Free registration at the forum removes this block.

Very specific wordpress.org / Hostgator problem - Help!

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
I'm having a problem with optimizepress (on Wordpress.org 4.4.2) & Hostgator. It's a very specific problem which I'm going to try to describe as clearly as possible. I'm hoping that someone who knows exactly what I'm talking about will be able to help.

I'm building a membership site. I have 1 product so far. I've set up most of it, but right now I'm trying to get the files that make up my product onto wordpress.

I can't upload them onto the media library directly because my files are huge. So I've uploaded them onto the cpanel of hostgator.

At first, after I uploaded them, I couldn't figure out how to make them appear in the media library. But then I found out about a plugin called Media From FTP and I managed to do it, by clicking on Search & Register. No problem.

But then, as I was watching various videos on how to set up optimizepress, one of them said that I need to protect not only the pages where my files would be, but also the files themselves.

The way to do this is to go to Optimizemember > Download Options > Basic download Restrictions.

Here's what it says there :

- - - - -
Upload restricted files to this security-enabled directory:
/wp-content/plugins/optimizeMember-files

- Now, you can link to any protected file, using this special format:
http://mysite.com/?optimizemember_file_download=example-file.zip
optimizemember_file_download = file, relative to the /optimizeMember-files/ directory. In other words, just the file name.

- Or, use: [opmFile download="example-file.zip" /] ( easier Shortcode if you prefer )
Shortcode equivalent: [opmFile /] produces the entire URL for you, easier.

- - - - -

So, I had to move my files into a special folder for them to be protected.

My files were originally in the /wp-content folder. So, I went into the plugins folder, then the optimizeMember-files folder, and then I created another folder named after my course, plus other folders inside that, in order to organize my files.

So, then I went into the Media From FTP plugin, to get my files into the media library. But when I tried, it only lets me search in the /wp-content/uploads folder (as well as whatever folders are in that one).

So I can't access my files. As far as I can see I have only 1 option, which is to move my files into the uploads folder. This would work, but it would be unacceptable because the files wouldn't be protected. I need them in the protected folder (optimizeMember-files) and I need to get to them from the plugin so I can put them in the media library.

And that's my problem. For days I've tried and tried to get an answer but I've come across nothing. If you're reading this and you know what I'm on about, what should I do? Most of my site is done apart from some tweaking, but this is really slowing me down.

Thanks.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48

eekern

BOBA
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
220%
Jul 21, 2015
263
578
35
Norway
Why do make it so difficult for yourself?

Use vimeo.com... Set the video to only show on your member domain.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:

MarkNNelson

Bronze Contributor
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
232%
Jul 12, 2013
172
399
Colorado
How about a plugin like Add External Media? Would that let you point to the underlying protected folder?
 

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
I really need help with this people. I need to be able to use the Membership Files Download element on optimizemember. My files are in the optimizemember-files folder in cpanel (they need to be there to be protected), but no matter how I try to construct the url for a file, it just doesn't work.

What I mean is that the url itself is fine but to do it on optimizemember, I need to do this :

http://mydomain.com/?optimizemember_file_download=myfile.pdf or whatever

But it doesn't allow it.
 
Last edited:

eekern

BOBA
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
220%
Jul 21, 2015
263
578
35
Norway
you are wasting valueble time, read my answer. I promise it is better than self hosting...
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
Are you saying that you have uploaded the files to hostgator but can't get them to the correct folder because you can't navigate to the folder you uploaded them to in cPanel?

If this is the case you can ssh into hostgator and move the files that way. You will be able to see your entire hostgator directory. Does that make sense?
 

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
Are you saying that you have uploaded the files to hostgator but can't get them to the correct folder because you can't navigate to the folder you uploaded them to in cPanel?

If this is the case you can ssh into hostgator and move the files that way. You will be able to see your entire hostgator directory. Does that make sense?

No they're in the right folder.

Normally, if I wanted to put them in cpanel in order to then move them into the media library, I would need to put them into this folder :

/public_html/wp-content/uploads/2016

But that doesn't apply for what I'm doing, because I need to protect them with optimizemember, by putting them in a specific folder in cpanel for that purpose. I guess protected files can't be moved to the media library (besides, they wouldn't be protectable even if they could).

This is what it says in Optimizemember-Download Options-Basic Download Restrictions :
- - - - - - - - - -
Upload restricted files to this security-enabled directory:
/wp-content/plugins/optimizeMember-files

- Now, you can link to any protected file, using this special format:

http://mydomain.com/?optimizemember_file_download=example-file.zip
optimizemember_file_download = file, relative to the /optimizeMember-files/ directory. In other words, just the file name.
- - - - - - - - - -


That's what I've done. My files are in this folder :

/public_html/wp-content/plugins/optimizeMember-files/myfile.whateverfiletype(i.e. pdf, mp4, whatever)

According to the instructions, it seems to be saying that I should replace "example-file.zip" with the name of my file. Does that mean the entire path or just the file name? I've tried both ways and none of them work.

When I try to create a Membership Files Download element on my downloads page on my site, it doesn't work. When it asks me to enter the URL of the file, it doesn't accept it. I've tried doing it in different ways but nothing works.

I need the files to be in that protected folder so that my files are only accessible for people with a particular type of membership (which the element lets me set), but I don't know exactly what to enter when asked for the URL of the file. I saw a video where someone just entered the file name and nothing else (i.e. whatever.pdf), and that worked for them, although it's not what optimizepress says to do.

This is just confusing. My files are there in cpanel, in the right folder, but I just don't know what to enter when it asks for the URL.
 

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
No they're in the right folder.

Normally, if I wanted to put them in cpanel in order to then move them into the media library, I would need to put them into this folder :

/public_html/wp-content/uploads/2016

But that doesn't apply for what I'm doing, because I need to protect them with optimizemember, by putting them in a specific folder in cpanel for that purpose. I guess protected files can't be moved to the media library (besides, they wouldn't be protectable even if they could).

This is what it says in Optimizemember-Download Options-Basic Download Restrictions :
- - - - - - - - - -
Upload restricted files to this security-enabled directory:
/wp-content/plugins/optimizeMember-files

- Now, you can link to any protected file, using this special format:

http://mydomain.com/?optimizemember_file_download=example-file.zip
optimizemember_file_download = file, relative to the /optimizeMember-files/ directory. In other words, just the file name.
- - - - - - - - - -


That's what I've done. My files are in this folder :

/public_html/wp-content/plugins/optimizeMember-files/myfile.whateverfiletype(i.e. pdf, mp4, whatever)

According to the instructions, it seems to be saying that I should replace "example-file.zip" with the name of my file. Does that mean the entire path or just the file name? I've tried both ways and none of them work.

When I try to create a Membership Files Download element on my downloads page on my site, it doesn't work. When it asks me to enter the URL of the file, it doesn't accept it. I've tried doing it in different ways but nothing works.

I need the files to be in that protected folder so that my files are only accessible for people with a particular type of membership (which the element lets me set), but I don't know exactly what to enter when asked for the URL of the file. I saw a video where someone just entered the file name and nothing else (i.e. whatever.pdf), and that worked for them, although it's not what optimizepress says to do.

This is just confusing. My files are there in cpanel, in the right folder, but I just don't know what to enter when it asks for the URL.

According to this line:

"optimizemember_file_download = file, relative to the /optimizeMember-files/ directory. In other words, just the file name."

you should just need to replace the file with the file name, not the full path

so for instance if under /public_html/wp-content/plugins/optimizeMember-files/ you had file1.png

The url should be www.domain.com/?optimizemember_file_download=file1.png

if under optimizeMember-files/ you had a subdirectory called memberFiles/ and it contained file2.png url should be:

www.domain.com/?optimizemember_file_download=memberFiles/file2.png

That is how it should work according to that documentation you just posted.

If it is not working, there are a couple things that could be wrong.

1. that URL assumes that wordpress is installed at the root of your domain, if instead it was installed in a subfolder, such as store for example then you would need to use www.domain.com/store/?optimizemember_file_download=XXX.x

2. not likely but could be a permissions issue accessing the files.

Have you tried logging in / authenticating as a user to your store and then typing the URL into the browser (instead of trying to create the element)? Do you get an error if you type in www.domain.com/?optimizemember_file_download=file in your browser? Is there any output?

You could also try looking / pasting the output of wp-content/plugins/error_log or the error_log in the main word press directory.

It's possible optimize press has it's own log output, I don't know anything about optimize press, just trying to help using general troubleshooting. If you know how to ssh onto your hostgator box you can run this command to find all log files relative to your wordpress directory.

First 'cd' into your wordpress directory will be public_html/ if wordpress is installed to the root of your domain and that is the only domain in your hostgator.

Then run 'find . -name "*log" ' to get a list of all files ending in log relative to that path. if there is one under optimize press, then post the contents here. Likely optimize press will just use the main plugins/error_log.

I'm not sure how technical you are or if those instructions make any sense but that is how I would start to narrow down the problem. I'm guessing you just having something configured differently than the default which is why the documentation isnt working.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
According to this line:

"optimizemember_file_download = file, relative to the /optimizeMember-files/ directory. In other words, just the file name."

you should just need to replace the file with the file name, not the full path

so for instance if under /public_html/wp-content/plugins/optimizeMember-files/ you had file1.png

The url should be www.domain.com/?optimizemember_file_download=file1.png

if under optimizeMember-files/ you had a subdirectory called memberFiles/ and it contained file2.png url should be:

www.domain.com/?optimizemember_file_download=memberFiles/file2.png

That is how it should work according to that documentation you just posted.

If it is not working, there are a couple things that could be wrong.

1. that URL assumes that wordpress is installed at the root of your domain, if instead it was installed in a subfolder, such as store for example then you would need to use www.domain.com/store/?optimizemember_file_download=XXX.x

2. not likely but could be a permissions issue accessing the files.

Have you tried logging in / authenticating as a user to your store and then typing the URL into the browser (instead of trying to create the element)? Do you get an error if you type in www.domain.com/?optimizemember_file_download=file in your browser? Is there any output?

When you say installing wordpress at the root of my domain, I don't know what that means.
- - - - -
You could also try looking / pasting the output of wp-content/plugins/error_log or the error_log in the main word press directory.

It's possible optimize press has it's own log output, I don't know anything about optimize press, just trying to help using general troubleshooting. If you know how to ssh onto your hostgator box you can run this command to find all log files relative to your wordpress directory.

First 'cd' into your wordpress directory will be public_html/ if wordpress is installed to the root of your domain and that is the only domain in your hostgator.

Then run 'find . -name "*log" ' to get a list of all files ending in log relative to that path. if there is one under optimize press, then post the contents here.
Likely optimize press will just use the main plugins/error_log.

I'm not sure how technical you are or if those instructions make any sense but that is how I would start to narrow down the problem. I'm guessing you just having something configured differently than the default which is why the documentation isnt working.
- - - - -
No sorry I don't know what any of that means. No I'm not very good at this.




When I uploaded the files, I set the permissions to 0755. But when I moved them into the protected folder, it automatically changed the permission to 0644. I guess that means that it's protected.

Yesterday I was chatting with someone from hostgator about this and they gave me the correct url of a file (not to be confused with the extra bit that optimizemember mentions), and when I clicked on it, it downloaded the file immediately. At first I was worried because that would mean that my file isn't protected, but then I remembered that I was logged into wp-admin at the time, so maybe that's why it downloaded it.
 

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
When you say installing wordpress at the root of my domain, I don't know what that means.

When I uploaded the files, I set the permissions to 0755. But when I moved them into the protected folder, it automatically changed the permission to 0644. I guess that means that it's protected.

Yesterday I was chatting with someone from hostgator about this and they gave me the correct url of a file (not to be confused with the extra bit that optimizemember mentions), and when I clicked on it, it downloaded the file immediately. At first I was worried because that would mean that my file isn't protected, but then I remembered that I was logged into wp-admin at the time, so maybe that's why it downloaded it.


See my edited answer for additional info from the logs.

When I say installing wordpress at the root of your domain.. if you can access wp-admin by going to www.domain.com/wp-admin it would be installed at the root.

644 still gives everyone read access so I don't see how that is protecting the file. Likely the folder they reside in itself is protected.

What was the "correct" url that hostgator gave you?
 

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
See my edited answer for additional info from the logs.

When I say installing wordpress at the root of your domain.. if you can access wp-admin by going to www.domain.com/wp-admin it would be installed at the root.

644 still gives everyone read access so I don't see how that is protecting the file. Likely the folder they reside in itself is protected.

What was the "correct" url that hostgator gave you?

Yes I can access my admin by going to www.mydomain.com/wp-admin

I can't remember the url that I was given.

(I've edited my previous reply)
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
Yea that makes sense actually.

You need to look at the output of your error log

The one at www.domain.com/wp-content/plugin/error_log

Can you download this file from cpanel and paste the last 20 lines or so (right after you try to access the URL www.domain.com/?optimizemember_file_download=file in your browser)?

I'm sorry but I don't understand what you're saying. I typed in www.mydomain.com/wp-content/plugin/error-log and all I got was ooops, this page couldn't be found.

I want to show you a couple of screenshots. How do I put images here?
 

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
I'm sorry but I don't understand what you're saying. I typed in www.mydomain.com/wp-content/plugin/error-log and all I got was ooops, this page couldn't be found.

I want to show you a couple of screenshots. How do I put images here?

You can't type that into the browser you will need to go to that location by using the file / ftp browser in cpanel. The file is located under wp-content/plugin/error-log
 

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
I did it, but it says this directory is empty.

Rename that file to "Introduction.pdf" (ie remove the 1)_ in front and then try to access the file using the URL

yourdomain.com/?optimizemember_file_download=Introduction.pdf

I think the ')' character may be screwing things up for you.
 

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
I tried :

1-Introduction.pdf
1Introduction.pdf and
Introduction.pdf

None of them worked. A couple of days ago I checked to see what characters are acceptable in a url and underscores are ok, and so are parenthesis. But even without them, it won't accept it.

By that, I mean that optimizepress won't accept it. But typing it in is fine, it downloads the file, even with the underscore and bracket.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
In that file explorer is there a log file under:

wp_content/plugin/optimizeMember/
or
wp_content/plugin/optimizeMember-logs
?

If there are logs in either or both directories attach them here.
 

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
I typed both in the search bar in cpanel. Nothing.

Instead of typing in the search bar just navigate to those directories like in that screenshot you sent. I see the directories are there. There are no files in either? That doesn't make any sense there would be no files in plugins/optimizePress so I have to think you aren't looking in correct place. Or do you mean there are no log files?
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
Is there an error_log under public_html?

You mentioned earlier "it wouldn't take the URL" or something along those lines. Can you post a screenshot of that and if it gives any error messages?
 

Johnny1975

Contributor
User Power
Value/Post Ratio
29%
Dec 21, 2015
89
26
48
Is there an error_log under public_html?

You mentioned earlier "it wouldn't take the URL" or something along those lines. Can you post a screenshot of that and if it gives any error messages?

What I meant was that when optimizemember asks me to enter the url of the file, no matter what I type, it doesn't accept it. There's no error message, just a red cross next to the text bar thingy, indicating that it'd not accepted.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

OverByte

Bronze Contributor
FASTLANE INSIDER
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
141%
May 18, 2014
291
409
Canada
What I meant was that when optimizemember asks me to enter the url of the file, no matter what I type, it doesn't accept it. There's no error message, just a red cross next to the text bar thingy, indicating that it'd not accepted.

Can I see the screenshot? I'm just interested in the exact phrase it gives you ie "enter URL, enter file name" etc
 

Post New Topic

Please SEARCH before posting.
Please select the BEST category.

Post new topic

Guest post submissions offered HERE.

New Topics

Fastlane Insiders

View the forum AD FREE.
Private, unindexed content
Detailed process/execution threads
Ideas needing execution, more!

Join Fastlane Insiders.

Top