File path issue
Posted by: martinvanstein (---.cm-3-4b.dynamic.ziggo.nl)
Date: May 22, 2018 07:47PM

Hi all,


I have used Duplicator Pro to back up my site ( which uses the themify plugin) to a local WAMP installation .
Now I am far from a professional developer, but I installed an additional PHP version, got my mysql database imported properly and at a first glimpse it all seemed to be unicorns and rainbows and it seemed I could start working on my site.

Unfortunately I am running into a strange URL problem.

You see my original site had a file path like this:
www.mywebsite.com/wp-content/uploads/year/month/filename.png

And I expected to get a "local" link like this:
localhost/mywebsite/wp-content/uploads/year/month/filename.png

Instead I get this:
localhost/mywebsite/C:/wamp64/wwww/mywebsite/wp-content/uploads/year/month/filename.png


So for some reason it injects this into the URL:
C:/wamp64/wwww/mywebsite/

Now if it was just an aesthetic problem I wouldn't mind, but it defaults to this link and thusfar I have found that it is impossible to install plugins and browse to upload images to the new site ...yes I can do everything by hand but I rather just fix it, as at some point I need to reimport it to the live environment and I would like to minimise the possible ef ups as much as possible.


I have contacted support for the plugin as well as the theme and posted on Wordpress support, but at this point I have only gotten some basic responses ( send log files, try XAMP, I don't have that problem when I do it) and I honestly think this file path must be defined somewhere and therefore it should be editable.
But I can't find where it is as none of the topics I have found are related to the issue I have


Thanks in advance for the help

Options: ReplyQuote
Re: File path issue
Posted by: Otomatic (Moderator)
Date: May 23, 2018 09:25AM

Hi,

CMS and WEB applications, and Wordpress in particular, must be installed in a VirualHost, as with all hosts.
See The need for Virtual Host and Wampserver 3 - Create or add a VirtualHost

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: File path issue
Posted by: martinvanstein (---.cm-3-4b.dynamic.ziggo.nl)
Date: May 23, 2018 10:16AM

Thanks Otomatic, have created a virtual host and got it working...but unfortunately the problem persists.

When I try to install a plugin locally, I get this error:

Unable to create directory C:/wamp64/www/projectname/wp-content/uploads/2018/05. Is its parent directory writable by the server?

When I try and use the build-in image uploader of the theme I use ( Themify), I get the same error and the images in its library still have this URL:
mywebsite/C:/wamp64/wwww/mywebsite/wp-content/uploads/year/month/filename.png

So it got rid of the localhost but not the crucial thing: C:/wamp64/wwww/mywebsite


Now in my general settings ( Wordpress Admin) it still had a localhost defined in its url and I changed and saved that to [mywebsite] instead of having the localhost prefix...restarted wamp and DNS ...but still no luck



Edited 1 time(s). Last edit at 05/23/2018 10:17AM by martinvanstein.

Options: ReplyQuote
Re: File path issue
Posted by: Otomatic (Moderator)
Date: May 23, 2018 10:27AM

Hi,

Wordpress, for all I know, hard writes the installation url in its database (And maybe in the configuration file). These values must therefore be changed between the remote installation and the local installation.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: File path issue
Posted by: martinvanstein (---.cm-3-4b.dynamic.ziggo.nl)
Date: May 23, 2018 11:04AM

Found it!
The mindless drone that I am, when I went through the set up via Duplicator Pro... in the 3rd step it has a definition of the path...this defaults to the whole windows directory C:/wamp/ww.....

I simply deleted the entire string and replaced it with /projectname and it worked...

Options: ReplyQuote


Sorry, only registered users may post in this forum.