Jump to content
franciccio-ITALIANO

for a local site on local pc...

Recommended Posts

Hi, I normally develope html-css of my site on my local pc in any folders, then I move all online by ftp.

But by this method I must change all img-css-js addresses of all html file every time!
It's is annoying.

Is there a way to do it automatically?
Exist a program for to develope html-css of the site in local, and moved all online by ftp WITHOUT MAKING CHANGES?

I would like to have a perfect copy of site in local, immediately transferable online by ftp....

It's possibile? How?

 

Share this post


Link to post
Share on other sites

If I understand your question correctly, as long as you use relative URLs instead of hardcoded absolute URLs, this shouldn't be a problem.

  • Like 2

Share this post


Link to post
Share on other sites

Ok thanks I didn't know this difference between absolute url and relative url. Now I think I have solved it. Later I see if it works on the online server.
But is there a program that allows you to create and publish online with a click via ftp, the site built on the PC?

Share this post


Link to post
Share on other sites
23 minutes ago, franciccio-ITALIANO said:

But is there a program that allows you to create and publish online with a click via ftp, the site built on the PC?

You can give a try to Duplicator (do not forget to use the "dev" branch).

  • Like 1

Share this post


Link to post
Share on other sites

I would agree with Jonathan about relative urls. Also, I found if I have an existing live site that needs new updates, using github server hooks is a great thing. I simply push to github and I have a hook in github that will push it live to the server.

Share this post


Link to post
Share on other sites
55 minutes ago, louisstephens said:

I simply push to github and I have a hook in github that will push it live to the server.

You have my attention... please tell more. 🙂 

Share this post


Link to post
Share on other sites
11 hours ago, franciccio-ITALIANO said:

Ok thanks I didn't know this difference between absolute url and relative url. Now I think I have solved it. Later I see if it works on the online server.
But is there a program that allows you to create and publish online with a click via ftp, the site built on the PC?

This article goes through many different techniques:
https://css-tricks.com/deployment/

My approach is using rsync inside a bash script:
https://css-tricks.com/deployment/#article-header-id-9

@wbmnfktr This is for you: https://css-tricks.com/deployment/#article-header-id-5

  • Like 3

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...