One place for hosting & domains

      How To Set Up Visual Studio Code (VS Code) for PHP Development


      Introduction

      Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems.

      With a large collection of extensions for many programming languages, VS Code can be customized to serve a wide variety of development needs. In this guide, you’ll learn how to set up Visual Studio Code for working on PHP projects.

      The gif shows the VS Code interface for PHP development

      Prerequisites

      To follow this guide, you’ll need to download and install the appropriate version of Visual Studio Code for your operating system.

      The instructions in this guide were validated on an Ubuntu 20.04 desktop computer, but they should work seamlessly in all operating systems that are supported by VS Code. Please note, though, that keyboard shortcut keys may need to be slightly modified for compatibility with MacOS systems.

      Right after installation, VS Code already recognizes PHP code and helps with syntax highlighting, basic debugging, and code indentation. These features are suitable for quick edits or when working with individual PHP scripts. Working in larger projects, though, can become difficult without more context around the code and how each file interacts and integrates within the larger project.

      There are a number of VS Code extensions that can help speed up your productivity when working on PHP projects. In this guide, we’ll install and set up PHP Intelephense, a popular PHP extension for VS Code that provides several advanced features such as improved code completion, better navigation between components, rich information tooltips on mouse hover, code auto formatting, and real time error reporting based on static code analysis.

      Open the extensions tab by clicking on the last icon on the left menu bar, or by pressing CTRL + SHIFT + X. This will bring up a sidebar menu with a search box and a list of popular or recommended extensions. Type “php” or “intelephense” to locate the PHP Intelephense extension. Click on the Install button to install and enable the extension.

      The gif shows how to access the extensions menu on the left sidebar

      Once installation is complete, Intelephense’s official documentation recommends that you disable the built-in PHP Language Features extension that comes with VS Code.

      To disable this extension, type @builtin php in the Extensions search box to locate the built-in PHP extensions. Then click on the settings icon for the PHP Language Features extension, and click the Disable option in the drop-down menu.

      The gif shows how to disable the builtin PHP Language Features extension

      If you have any files open in VS Code, you’ll need to reload the editor to apply the changes.

      You can install other extensions by following the same process described for the PHP Intelephense extension, but be aware that some extensions will require additional software to be installed on your system. Check the extension documentation to make sure you have requirements set appropriately.

      Step 2 — Importing or Creating a New PHP Project

      To import an existing PHP project into VS Code, click on the first icon on the left menu bar or type CTRL + SHIFT + E to access the file explorer. Click the Open Folder button and select your project’s directory. In case you are creating a new project, you can create a new folder and select that as your project directory.

      The gif shows how to import a PHP project to VS Code

      The explorer window will now show the project’s directory tree, giving you quick access to files and directories on your project.

      Step 3 — Customizing Theme and Editor Font (Optional)

      Although not necessary, it is often a good idea to customize the appearance of your editor to make it more comfortable to use in the longer term. As a developer you may spend several hours every day looking at an IDE such as VS Code, and for that reason it’s important to make sure the editor font has an appropriate size, and the contrast is enough for good readability without tiring your eyes too quickly.

      You may want to experiment with different themes and fonts in order to find a custom setup that works well for you.

      Changing VS Code Theme

      VS Code comes with a few different themes that allow you to change the colors used in the editor interface and in the code highlighting. Both dark and light styles are included by default.

      Go to File -> Preferences -> Color Theme or type CTRL + K + T to select a different theme for VS Code.

      The gif shows how to change VS Code theme

      You can also install theme extensions to further customize VS Code’s appearance. If you search for theme within the extensions tab (CTRL + SHIFT + X), you’ll find several theme extensions in different styles and colors, including color schemes ported from other popular editors and platforms.

      Adjusting the Font

      Although the default VS Code font settings will be good enough for many users, you may want to adjust the size and the type of the editor font for increased readability.

      If you would like to modify the font size or change to another type, you can go to File -> Preferences -> Settings, then choose Text Editor on the left menu. Then, click on Font in the submenu that opens up. That section contains font family and size settings which you can tweak as preferred.

      The gif shows how to change VS Code editor font size

      The changes are immediately saved and applied to all current open files.

      Conclusion

      Visual Studio Code is a lightweight yet powerful code editor that can be customized to suit the needs of most developers. In this guide, you learned how to install and configure the PHP Intelephense extension for extra support while working on PHP projects, how to import and create new projects within VS Code, and how to customize the editor appearance for a more comfortable coding experience.

      For more tutorials on Visual Studio Code, check our VS Code tag page. If you’d like to learn more about PHP development, you can refer to our How To Code in PHP series for an introduction to the language, and our PHP tag page for more PHP tutorials.



      Source link

      The Smart Way to Scale Your Business Online


      You’ve started your own business. Congratulations! Whether you’re selling cupcakes using Grandma’s secret recipe, photographing chic weddings, hosting events, running (around) a preschool, selling handicrafts, or building the next must-have app — pat yourself on the back. The challenge of starting a small business and raking in those first few dollars is no joke.

      But don’t you dare rest on your laurels, ahem.

      You’ve got a steeper mountain to climb: scaling up. If you are serious about your business and its success — and we know you are — you’ve got to grow, and keep growing, to survive year after year. Once a business is well established, a concentrated focus on scalability can move it from initial profits into big-time revenue.

      And you’re in luck: when it comes to scaling your business, the secret ingredient to success is affordable, accessible, and omnipresent. That’s right, the internet is your new best friend.

      It’s the 21st century, folks; simply having a website — an essential, indispensable first step — won’t cut it. Real scale and success can be yours by smartly leveraging your business’s presence online. When you combine a great product or service with some internet savvy, any summit you set is in sight.

      If you are ready to grow, let us help! The following tips will set you on the path to scaling your business online, the smart way:

      Optimize Your Business with DreamHost

      Our automatic updates and strong security defenses take server management off your hands so you can focus on sustainable growth.

      Starting Off Right

      Scaling isn’t as hard as it looks, but it isn’t for the faint of heart either. Before you attempt any growth strategies, step back and consider your destination and your starting point. Begin your reflection with these questions:

      What Are Your Goals?

      Consider your endgame. What does growth look like for you and your business? Do you want to scale a scrappy software startup (alliteration unintended, I swear) or just build a second (or third or fourth) location? Attract higher-paying customers or convert online traffic into more sales? Either way, set a timeline, know your goals, and let them define your next steps. Keep re-evaluating your progress based on your goals — and don’t be afraid to adjust them as you move ahead with your small business.

      Is Your Business Really in a Good Place?

      Be honest with yourself. If the answer is “no,” scaling is not your next step. “If your business stinks,” as marketing bigwig Dan Kennedy famously said, “the last thing you want to do is get the word out about it.” Nail your model and perfect your product before attempting any business growth.

      Are You Working in or on Your Business?

      If you are going to expand your restaurant’s menu and attract more clientele, you can’t be the one chopping and frying potatoes during the lunch rush. As a small business owner, your first priority is the big picture.

      If you haven’t made it a point to get out of the kitchen and into your head, planning your daily activities around building the business and brand, you won’t have the bandwidth or focus to scale successfully. You may need to hire more employees to take the day-to-day operations off your hands.

      Who’s Paying for This?

      Evaluate your financing and fundraising options, and know what kind of capital you have to play around with. Do you need to take out a small-business loan, and are you in a position to qualify for one?

      The amount of cash you have can skyrocket or ground your growth — luckily, using the internet to scale can be, for the most part, easy on the wallet. As you look at your finances, you may brainstorm ways to cut costs — for example, instead of hiring a cadre of new employees to help you scale, try contracting out the work to freelancers.

      Building Your Presence

      Are you committed to scaling your business online? Awesome. It’s time to get our hands dirty.

      Get Online

      Do you already have a website for your business up and running? If so, pass “Go” and collect $200.

      If your business doesn’t have a home online yet, there’s no time like the present. Even if you have a traditional brick-and-mortar store with nothing to sell directly online, a website will give customers around-the-clock access to information about your business. You’ll be able to advertise, promote specials, and seek out new customers 24/7, on the clock or off.

      Nervous about getting your technical skills up to snuff? It doesn’t get any easier than DreamHost’s WP Website Builder, a suite of premium tools and plugins designed to simplify starting a website and make it easier to edit and manage as it grows.

      If you’re looking to sell items online, we’d recommend building a WordPress website and utilizing an e-commerce tool like WooCommerce or Shopify to power your store. We’ve even identified five WooCommerce templates to help you boost sales.

      No matter what, make sure to utilize reliable web hosting that can scale up with your business as it grows and attracts more online traffic. And you guessed it: DreamHost can help you there as well.

      Simplify Your Site

      You have five seconds or less to convince website visitors to stick around, so what you’re offering has to be simple, clear, and attractive. If website visitors can’t tell immediately what you are selling and how to buy it, they will move on and take their credit cards elsewhere.

      Make sure website navigation is clear and consistent from page to page. Don’t plaster videos, photos, and other content all over for the sake of filling up your website; everything should have a purpose that enhances your website’s message.

      Create and Maintain a Useful, Relevant Blog

      Update your blog regularly with company updates, profiles on customers, information on products new and old, and free content relevant to your area of expertise. These blog posts can be shared on your social media accounts (more on this later, hang tight!) to draw in more page views. Don’t simply recycle posts from similar websites; create fresh, original, and SEO-friendly content to attract new traffic and keep visitors coming back for more.

      Not a writer? Consider hiring (or contracting) marketers and copywriters to give your content a fresh face and professional polish.

      List with Google My Business

      When internet users — which, these days, is almost everyone — have a question or are looking for a specific service near them, there is only one source of information: the almighty Google.

      One of the best ways to make sure your small business is discovered is by doing everything you can to make sure it tops Google searches when potential customers are looking for similar products or services. One of the best ways to improve your search engine hits, especially if you own a brick-and-mortar shop, is to register with Google My Business.

      Google My Business is Google’s online directory listing for businesses. Millions of companies, big and small, have registered their address, phone number, website, and other details with Google. Registered businesses will show up in Google Maps, which will help you attract more local foot traffic. Customers can add pictures or reviews to your listing, so make sure to encourage people to rate your business, and respond quickly and sensitively to any negative feedback.

      Best of all: the listing is completely free!

      Fine-tuning Your Site

      Once your site is up and running well, it’s time to dig in and really make it work for your business.

      Add a Call to Action

      Every piece of content on your website (page, post, or anything else) should invite your visitors to do something — otherwise, you could be driving visitors away. Your calls to action can range from simply asking for comments or social media engagement, to inviting users to opt into a newsletter or come to your store for a special sale, to straight out asking or encouraging to purchase your product or service.

      Most of us need a little nudge to spur us into action. The purpose of your website should be to offer that nudge, as clearly as possible, and inspire potential customers to commit. Use the goals you set for how you want your business to grow to guide your calls to action.

      Build a Public Profile

      Marketing is not about selling products; it’s about people and their stories. This is why an “About Us” page on your website is essential and not just filler. The content on this page can actually be a powerful marketing tool.

      People buying your product want to know you and will be charmed by an interesting origin story and captivating “person-behind-the-product” narrative. Cultivate your story; create a public persona for the company and share the passion that led you to create your small business. Make sure to be authentic, but dig in to find a story that will resonate with your target market and paint the face behind the business.

      Study SEO

      Learn everything you can about SEO basics and best practices. SEO is an essential skill; it is no longer optional if you want your voice to be heard among thousands upon thousands of competing messages on the internet. Creating optimized content will drive your website up in search engine results and drive traffic to your website. At times, SEO can be a time-consuming headache for small-business owners, so make sure to hire employees who understand SEO and content marketing or consider outsourcing.

      Make It Easy for Customers to Make Purchases

      Like, ridiculously easy. Try navigating through your website with fresh eyes — or maybe recruit a friend or generous family member, ideally one not closely acquainted with your business, to give an honest opinion.

      How hard is it to figure out what products or services you are selling and where to go to purchase them? Both should be clear and intuitive.

      Consider ways you can fine-tune the checkout process (you should be doing this as part of your regular website maintenance anyway), or how you can improve how you offer your product. For example, can you create a form or questionnaire to offer online quotes, rather than requiring potential customers to email you or pick up the phone and call you?

      Consider Your Offerings

      You may have perfected your product or service, but is there more you can add? If your business is anchored in a brick-and-mortar model, is there something supplemental you can sell exclusively online?

      For instance, these DreamHost customers expanded their product line and switched to an online-only model to grow their herbal remedy business.

      Or maybe you already offer online or in-person consultations. Think about adding more options — shorter (or longer) consultations or a cheaper option for customers to ask a simple question via email or a Skype session. A lower price point may reel in more customers, and maybe even convert to bigger sales in the future.

      Reaching Out

      Once you’ve nailed your site, it’s time to look outward to help draw traffic in and drive growth.

      Build a Database of Potential Customers

      Then draw past ones back in — through smart email marketing. Targeted email marketing is much more affordable and more effective than print or other advertising. Anyone who visits your website is a hot lead. Web surfers landed on your page for a reason, so don’t let them slip away — or rather, don’t let your business slip out of their minds.

      When they first visit your site, offer a free product or special offer in exchange for their email addresses. This could be a discount code emailed to them, a printable coupon to bring by your store, an email offering free but relevant information, or a subscription to an email newsletter. Do everything you can — that isn’t sketchy or illegal, obviously — to collect email addresses to encourage further interaction.

      Create a Useful Email Newsletter

       Offer an opt-in subscription to an emailed newsletter to your social followers, website traffic, and customers. Build your newsletter so that it doesn’t look and read like junk mail, and send it out regularly to any and every email address that you collect. If the content is fresh and compelling, email newsletters can inspire opens and clicks that drive traffic to your website.

      Announce company milestones, build community, offer “subscriber only” sales and coupons. Draw on your website’s blog content, and include a call to action in every email. A regular email newsletter will help you build a long-term relationship with customers, and will help you measure responses to your products and marketing techniques.

      Work the Weekends

      Get the word out and drive foot traffic to your website or physical storefront, even when you’re off duty, by automatically sending out coupons and special promotions on slow days and holidays.

      Follow up with Past Sales

      People who bought from you once are likely to buy again. Don’t let past customers slip through the cracks; follow up with them and keep reaching out regularly. Consider offering products similar to the purchase they made, request feedback, send coupons, and invite them to subscribe to your newsletter.

      Scope out the Competition

      You’ve got a pretty good website now — and, as luck would have it, so does your competitor. Time to do some snooping. Check out the websites of any competing businesses, and take a look at their offerings, their calls to action, their free content and newsletters, etc. And then ask yourself what you can offer that is unique or different.

      Seek to compete not only in price, value, and quality but by offering something new and more convenient or helpful. Keep tabs on competitor websites to stay apprised of trends.

      Getting Social

      Second in importance only to getting a website is getting on social media to build your brand and cultivate clientele. Don’t feel pressured to join every platform all at once; consider focusing your efforts on one or two, especially if you target a niche market that tends to prefer a specific platform.

      Targeted Social Media Advertising

      With targeted Facebook ads, you can reach the customers who would most benefit from your offerings and drive them to your website and store. Social media advertising for your online business can be very affordable and effective because you can create customized advertising and posts that reach the demographics and parameters you specify. Carefully tease relevant content from your website to give your products face time and make clicks irresistible.

      Create a Brand

      Social media is often the public face of your small business, so name your accounts carefully and consistently. Make sure to pick a handle that is easy to remember and connect with your business. Cultivate a persona that jives with your business and its market across all platforms, and be strategic about what, when, and where you post. For a professional edge, consider hiring or contracting a social media manager.

      Cross-Pollinate

      Promote website content on each of your channels, but also use social media posts to drive traffic to your other accounts to build followers across each one. A simple post encouraging your Twitter followers to connect on Facebook — complete with a link to your page — would do the trick.

      Don’t bore your followers by posting the same content everywhere; again, keep a consistent voice, but experiment with the opportunities unique to each platform to delight and hook your followers.

      Connect and Network

      Connect with businesses and leaders in your field. Like their Facebook pages, comment on posts; invite them to your website, invite them to lunch. Don’t be afraid to rub shoulders with the competition online. It will help you gain exposure among your target audience.

      Crowdsource

      Is there a product that you know your customers would love, but you don’t quite have enough funds for? Whether your business model is primarily online or not, try a Kickstarter or other crowd-funding campaign to attract — and gauge — interest in your product and get the funding you need to expand your business’s offerings.

      A crowdfunding campaign also builds brand loyalty and is very shareable and clickable on your social media accounts. Include links to the campaign on your website, and point visitors to the campaign page back to your website for more information about your other products and services.

      Establishing Expertise

      You can help your business grow by helping it establish a reputation — a good one, hopefully. Leverage the internet to become known within your market and beyond as an expert in your field.

      Create a Community

      If you build it, they will be able to come. Create a community space online for your customers and like-minded people to congregate, learn, and share ideas. One way to do this online is by creating a Facebook group, not just a company page, especially if you cater to a niche audience.

      Invite your customers to ask questions and build relationships. Use the space as a place to offer sales, exclusive offers, and giveaways for your product. If your group takes off, it can be a great way to know and understand your audience — and for them to understand you and build long-term loyalty. As a side note, you will need to set group ground rules and find someone to moderate posts and resolve conflicts.

      Offer Free Content

      People search the web for information to learn and solve problems. If you provide bits of expert, useful information for free — like we try to do here on the DreamHost blog, wink — you will get more hits and better search engine rankings. Create shareable videos, articles, infographics, etc., and spread it on social media.

      The goal is to create something useful and creative enough that people already within your network will want to share with their friends and family, which will build more exposure for your brand and bring in more potential customers. Always include a link back to your website or a call to action offering more information or encouraging a purchase.

      Teach Classes

      Share your expertise for free and not just as a marketing stunt. Teach or host classes of interest to your customers in your store or broadcast and archive them online. Or make a how-to video to share on your website and tease with your social media accounts. Encourage your customers and followers to share their ideas and suggest future topics.

      Host a Free Q&A

      Consider regularly asking your customers, on your social media accounts or website blog, to send you questions related to your product or service or its subject area. This works especially well if you are a consultant of some sort.

      For example, a baby sleep consultant may ask for specific questions from parents weekly and create a video or blog post answering those questions. This establishes the consultant’s smarts and attention to specific problems while encouraging potential customers to commit to more specific advice. It might be helpful to include an archive of past Q&As on your website.

      Spread the News

      Gain exposure and develop your reputation for expertise by registering and participating with Help A Reporter Out (HARO). HARO is a free website database that connects reporters and sources.

      When you register, you’ll get a regular email with queries from reporters and journalists looking for an expert source to comment on their stories. So if you’re a dietician and spot a query from a journalist looking for a quote for a story on the latest diet fad, you have the potential to position yourself as an expert in front of the audience that you are targeting.

      A mention in a news outlet builds credibility for your business and provides a great link back to your website (if the article is published online). Include any mention of your business in the news on your website and share on your social media accounts for additional exposure.

      Adding Things Up

      When you’re scaling your small business online, you have to know your numbers. The internet makes it simple to track your efforts to scale and test which methods are most — or least — effective for your business with your specific market.

      Track Key Metrics

      Check clicks, opens, page views, and more. Learn what kinds of things work and what doesn’t. What kinds of discounts, free content offers, blog posts, and email headlines attract more clicks? Don’t be afraid to experiment and track responses to your campaigns. Try your hand at A/B testing and fine-tune your marketing plan based on what entices the most clicks, opens, subscriptions, and purchases from your potential customers.

      If you really want your business to scale, you are never going to “set and forget” your website or any of your marketing techniques. You’re not making slow-cooker pork. Everything must be carefully monitored, measured, and adjusted as necessary.

      Know Your Costs

      As you work to scale and grow your business online, it is important to track your costs, down to the nickels and dimes. Money can be tight in a small business, and you need to know where and how to spend it best. Here are two important metrics you need to watch closely on a regular basis:

      Cost per Lead

      A lead is whenever someone downloads your app, signs up for your newsletter, requests a quote or more information, etc. Whether you are collecting names at a trade show, gathering email addresses through a newsletter or other offer, or creating shareable social media infographics, you need to know if how much you are spending is actually paying off in the number of people who respond to your campaign.

      Calculate this by dividing how much you spent on marketing (make sure to account for the time you spent and how much you paid for advertising, writers, employees, etc.) by the number of new leads. Regularly ask yourself if the cost is worth the leads generated, and if it is time to experiment and try a new tactic.

      Cost per Sale

      How much time, effort, and money are spent per actual sale? Calculate this by measuring the amount you spent on finding new customers by the number of people who purchased your product or service. If your cost per sale and your cost to create your products are less than the sales price, you’re making a profit. Yay!

      Dive deeper and analyze this cost for each of your offerings, if possible, to find the lowest cost per sale, and see if there is something you can do to attract even more customers to purchase it. Are there products or services that are less profitable? What changes do you need to make to increase profit or decrease cost?

      Got a Growing Business? You’re Invited!

      Join DreamHost’s Facebook group to connect with like-minded website owners and get advice from peers and experts alike!

      Breaking the Scalability Rules

      The suggestions here are a great starting place to help you attract more customers so you can scale your business online. But if you follow every strategy and best practice suggested for small business websites, yours will start to go a little stale. Do you really want your message to get lost amid the thousands of websites employing the same tactics and templates?

      Probably not.

      So take the advice we’ve given as a place to start. Look at your analytics to see what works best for your e-commerce business and audience, and try breaking a few rules.

      For example, take free content. We all love free content, but you are going to find it everywhere. That’s how the internet works. But do you have something really valuable that you can charge for? Curated recipes, exclusive knitting patterns, customized diet plans; valuable content that deserves to be behind a paywall? Did you know you can charge for an email newsletter if it offers enough value to the reader?

      Recently an unknown tech blogger built his business by creating a daily email update with posts analyzing or opining on news and technology — and charging monthly for it. The small cost came with great value to the customer, and it proved to be a successful growth strategy.

      The internet is always changing. That means it’s a great place to experiment with both tried-and-true methods and the latest digital marketing trends to see what works for your revenue growth. However you go about building a successful company, DreamHost is here to support you! Learn more about how our affordable hosting plans make it easy for you to create and maintain a digital presence.



      Source link