The "No Dev Question is Stupid" Thread - Basic HTML / CSS / Etc.

Discussion in 'DevOps' started by Ryuzaki, Mar 17, 2017.

  1. Pushup

    Pushup

    Joined:
    Feb 6, 2017
    Messages:
    19
    Likes:
    10
    Degree:
    0
    What do these static-site generators that @turbin3 has been talking about have over old school html or php files? If my content is sitting in Folder1, couldn't I just code a simple bash script to inject stuff into these files and save them into a new folder.
    • Script writes javascript / php include () statements at certain points within content to render newsletter opt-in boxes, ads, analytics code etc.
    • All content is injected into a responsive html template & all images auto-scale via css.
    That gets dumped into Folder2 and is uploaded via FTP to the server. If the site needs a tweak, change desired parameters in the bash script, regenerate and upload /replace old site.

    Static home page, 'blog' page uses file time stamp for post date. Don't want comments, while forms and other functionality can be handled by 3rd party services.

    Yeah, but I just see "shit I have to learn" x 3, plus probably github too . What would my ghetto bash mail-merge ftp system be missing vs. learning to use a proper site generator?
     
    doublethinker likes this.
  2. turbin3

    •  
    •  
    turbin3

    Joined:
    Oct 9, 2014
    Messages:
    367
    Likes:
    635
    Degree:
    2
    A generator might not really do much for you, as it sounds like you already have your own setup pretty well in order. I guess the main attraction with some of these generators is in them providing a bit more of a structure to work from, so there might be a bit less guess work, at least for the average use. Though, by no means are they entirely necessary or recommended for everyone.
     
  3. doublethinker

    doublethinker

    Joined:
    Apr 5, 2017
    Messages:
    62
    Likes:
    29
    Degree:
    0
    Besides the impact of ip host location on site SEO, what are the potential issues of using the same server and ip address for multiple websites?

    Could an unknown player identify all the sites registered to the IP?

    Is that (and it seems obvious) a way that Google identifies PBNs? And if so does that devalue cross-network links?
     
  4. JasonSc

    •  
    JasonSc

    Joined:
    Mar 30, 2016
    Messages:
    52
    Likes:
    73
    Degree:
    0
    Speaking strictly from an SEO point of view and assuming you are 90% white hat. We have not had any issues having multiple sites on the same IP address. Look at shared hosting, they have hundreds if not thousands of sites on the same IP address.

    Speaking from personal experience: Last year we merged several VPS into 2 dedicated servers. We did not see any negative impacts from this.

    If you are thinking about interlinking sites on the same IP I would tread lightly.

    Yes. You can do reverse DSN lookups and IP looks ups. http://viewdns.info/reverseip/

    If you are worried about people finding your portfolio of sites, you can partially hide with CloudFlare. The normal SEO does not know how to find real IP addresses from CloudFlare, but its not 100% safe for hiding IP address or name servers. See @CCarter post here.
     
  5. doublethinker

    doublethinker

    Joined:
    Apr 5, 2017
    Messages:
    62
    Likes:
    29
    Degree:
    0
    Yes I was thinking about this. Not a PBN and I sure as heck don't want to be seen as one.
     
  6. JasonSc

    •  
    JasonSc

    Joined:
    Mar 30, 2016
    Messages:
    52
    Likes:
    73
    Degree:
    0
    I personally have no data or experience with this, only hearsay, so I will defer this to someone who does.
     
  7. built

    •  
    •  
    built

    Joined:
    Jan 23, 2015
    Messages:
    1,402
    Likes:
    1,158
    Degree:
    4
    If I buy an html template from themeforest, will it be more or less the same as using a flat file system since their is no database?

    Trying to learn how to use grav etc but Ive got no idea how to build the site i want
     
  8. Rageix

    •  
    Rageix

    Joined:
    Jan 11, 2017
    Messages:
    48
    Likes:
    73
    Degree:
    0
    Hmmmm, depends what you are trying to accomplish. For a small site (like several pages) you could probably get away with it, but doing anything at scale with flat files like that is going to become a giant pain in the ass real quick. If doing anything of size you'd want to modify the theme and use a generator.

    Keep in mind as well that these pre bought themes need some work to become production ready, there was a thread recently about this.
     
  9. Nat

    Nat

    Joined:
    Nov 18, 2014
    Messages:
    564
    Likes:
    337
    Degree:
    2
  10. turbin3

    •  
    •  
    turbin3

    Joined:
    Oct 9, 2014
    Messages:
    367
    Likes:
    635
    Degree:
    2
    There may be an easier way, as I'm not as familiar with that plugin. Here's an off the wall idea though. Might be something interesting that could work, possibly using the CSS "display: table" property. Might need to rig it with "nth-child" or something else to determine what is in what column, though I'm not sure if that will be feasible or not for your use case. Might also need to do a few media queries. Here's a few good articles on display: table:

    https://colintoh.com/blog/display-table-anti-hero
    https://www.sitepoint.com/solving-layout-problems-css-table-property/
     
  11. JasonSc

    •  
    JasonSc

    Joined:
    Mar 30, 2016
    Messages:
    52
    Likes:
    73
    Degree:
    0
    Are there any negative issues with having a large htaccess file?

    I'm working on a site and the slugs are basically KW stuffed. When all is said and done, the htacess file would have over 500 301 redirects plus the normal caching code.

    I'm not worried about the internal linking because I can fix that, but this site has a lot of backlinks and I don't want to waste any juice and provide a good user experience.

    Relatively speaking it's a low volume site, 100 visits a day.
     
  12. Rageix

    •  
    Rageix

    Joined:
    Jan 11, 2017
    Messages:
    48
    Likes:
    73
    Degree:
    0
    On one hand, yes, it's a negative as Apache has to parse that .htaccess file every page load. On the other hand, no, the site only gets 100 visits a day.

    Probably fine for now, but if you up traffic to it, you should really clean that up.
     
    SmokeTree, CCarter and JasonSc like this.
  13. Tucky

    Tucky

    Joined:
    Dec 17, 2015
    Messages:
    100
    Likes:
    48
    Degree:
    0
    New question guys (and girls)...

    I have experience in a certain niche selling customised products. My other sites use Opencart but I find it a bit of a nightmare so wanted to use wp this time for a new site. Basically I need customers to buy a product and be able to upload their image to go on the product. Then they go through to checkout. Is this easy to do? I looked at a few plugins but wondered if you had any experience with this.

    Cheers
     
  14. GMerov

    •  
    GMerov

    Joined:
    May 7, 2017
    Messages:
    9
    Likes:
    6
    Degree:
    0
    Are WooComm sites generally slow to load? The one I'm building seems to be. It's hosted over at godaddy. And does having SSL cert also contribute to slow load?

    Thanks in advance!


    .
     
  15. turbin3

    •  
    •  
    turbin3

    Joined:
    Oct 9, 2014
    Messages:
    367
    Likes:
    635
    Degree:
    2
    @GMerov, Depending on your hosting plan, I'd guess it's a shared plan, which are almost always the bottleneck. Generally, hosts like Godaddy and Hostgator are slow, especially for shared plans, so I'd avoid them if possible.

    SSL (TLS) does technically have less speed potential than HTTP, though to what degree is always the question. In this case, particularly for an ecommerce site, TLS is pretty much a requirement anyways, so I wouldn't worry about it. If anything, maybe it's a few extra milliseconds. Not a big deal.

    I'd run the site through this tool: GTMetrix
    Then start checking over the Pagespeed, Yslow, and Waterfall tabs to get a sense of where some of the major problems areas are.
     
    Ryuzaki, Rageix and darkzerothree like this.
  16. Rageix

    •  
    Rageix

    Joined:
    Jan 11, 2017
    Messages:
    48
    Likes:
    73
    Degree:
    0
    @GMerov

    Just like a lot of things in life you don't get something for nothing in the hosting world. Shared hosting is typically pretty bad. Most shared hosting providers oversell their hardware. There are the rare exceptions, but they typically don't last or get bought out. If you are looking to get more consistent performance consider getting a VPS. You get a better slice of the server performance and you can even get managed ones if you are willing to pay for it. Costs more, but you get more.

    Also yes, SSL does have a performance impact, but it is pretty small. You should not worry about it.
     
    Ryuzaki likes this.
  17. GMerov

    •  
    GMerov

    Joined:
    May 7, 2017
    Messages:
    9
    Likes:
    6
    Degree:
    0
    @turbin3 @Rageix ... thanks! Yslow 64% ...begins by giving the site four straight Fs! Pagespeed is super fast 94% and Waterfall is something I'll take a long look having just signed up to GTMetrix.

    Speaking of signing up, I just grabbed a fresh new BuSo badge.

    Thanks again!
     
    Ryuzaki likes this.
  18. Faust

    Faust

    Joined:
    Jan 20, 2016
    Messages:
    10
    Likes:
    3
    Degree:
    0
    How would you set up Git (or any other versioning control) on shared hosting (e.g. BlueHost) or others in a easy way?
     
  19. Rageix

    •  
    Rageix

    Joined:
    Jan 11, 2017
    Messages:
    48
    Likes:
    73
    Degree:
    0
    @Faust

    Unless you can get root on your shared hosting would mean you can't do this. At least I've never seen it on a shared hosting environment.

    So the decision starts becoming should you just have someone host it, or do it yourself?

    If you have no Linux admin skills, a good option is simply getting a paid account on Github which will allow you to have private repos. It's only $7/mo for private repos. Good for most people honestly.

    If keeping your stuff off of others infrastructure is important, you can set up Gitlab on your own server . The packages basically install themselves. Pricing varies, but prob $20 or less a month if you do it yourself.

    Also could go over to Digital Ocean and you their one click installer for Gitlab. Pricing based on what droplet you chose.

    There are of course other options to just installing git on a server and using that, but seems a bit out of scope here.
     
    Faust likes this.
  20. darkzerothree

    darkzerothree DunkelNullDrei

    Joined:
    Feb 16, 2017
    Messages:
    127
    Likes:
    101
    Degree:
    1
    @Faust

    Or just use bitbucket for your git needs. Free private repo's included.
     
    Faust and SmokeTree like this.
  21. turbin3

    •  
    •  
    turbin3

    Joined:
    Oct 9, 2014
    Messages:
    367
    Likes:
    635
    Degree:
    2
    GitHub + hosting a static site there is a great way to start easing into version control + pushing to a remote host. It eliminates the need to worry about server setup and management, which is always filled with tons of "time-wasting" efforts to get one sidetracked. GitHub + GitHub hosting + Jekyll has made for a good combo for a lot of people, though it really depends on your site needs. If it's a simple site that does not need a high degree of dynamic functionality, and you simply need a home for static content, definitely worth considering.

    Bitbucket is good too, and is similar in nature, though I'm not sure what hosting options there might be as I don't use it much at all.
     
    Rageix and Faust like this.
  22. Rageix

    •  
    Rageix

    Joined:
    Jan 11, 2017
    Messages:
    48
    Likes:
    73
    Degree:
    0
    I'm not saying Bitbucket is bad, but there is a reason I did not mention it. Like a lot of services, anything free means you are the product (or your code is). That and in an actual professional sense Github is the clear choice between most business I've worked with. It is clear looking at Bitbucket that their goal is to get you in to their eco-system. Good, bad, indifferent, that is up to you.
     
    turbin3 and doublethinker like this.
  23. darkzerothree

    darkzerothree DunkelNullDrei

    Joined:
    Feb 16, 2017
    Messages:
    127
    Likes:
    101
    Degree:
    1
    @Rageix
    Github is free as well, you only have to pay for private repositories.
    Your arguments against bitbucket also apply to GitHub.
     
  24. Joe

    Joe

    Joined:
    Apr 25, 2015
    Messages:
    22
    Likes:
    15
    Degree:
    0
    I do it, on my shared hosting environment (I'm poor lol). Quite straightforward, just `git init --bare` in a directory in your shared hosting (I use bluehost), then checkout the repository to your local machine using ssh. It all just goes over ssh urls.

    One of the remotes in my local instance:
    Code:
    production      ssh://[my-username]@[my-shared-hosting-domain].com/home2/[my-username]/src/[repository-name].git (fetch)
    production      ssh://[my-username]@[my-shared-hosting-domain].com/home2/[my-username]/src/[repository-name].git (push)
    
     
    Faust likes this.
  25. doublethinker

    doublethinker

    Joined:
    Apr 5, 2017
    Messages:
    62
    Likes:
    29
    Degree:
    0
    What commands should I use to delete everything inside the "public" directory (/srv/users/serverpilot/apps/pizza-site/public) except .htaccess and robots.txt?

    I will be using this as a scheduled cron task.