InMotion Hosting Support Center https://www.inmotionhosting.com/support/ Web Hosting Support & Tutorials Wed, 27 Nov 2024 18:11:56 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 https://www.inmotionhosting.com/support/wp-content/uploads/2019/09/imh_favicon_hd.png InMotion Hosting Support Center https://www.inmotionhosting.com/support/ 32 32 162937910 How to Access the MailChannels Dashboard from cPanel https://www.inmotionhosting.com/support/email/mailchannels/access-mailchannels/ https://www.inmotionhosting.com/support/email/mailchannels/access-mailchannels/#respond Thu, 14 Nov 2024 19:40:29 +0000 https://www.inmotionhosting.com/support/?p=128874 Read More >]]> How to Access the MailChannels Dashboard

If your hosting plan includes MailChannels, you can access the MailChannels Dashboard directly from your cPanel account. This guide will walk you through the steps to view and manage your email activity, check deliverability, and monitor email issues.

What is the MailChannels Dashboard?

The MailChannels Dashboard provides tools and insights for managing your incoming email activity. With the dashboard, you can:

  • Reduce the amount of spam in your inbox
  • Block harmful messages that may contain phishing or malware
  • Ensure only legitimate emails reach your inbox

Steps to Access MailChannels Inbound Filtering from cPanel

  1. Log into cPanel.
  2. Access your cPanel by going to yourdomain.com/cpanel or by logging in through your Account Management Panel (AMP) and selecting cPanel.
  3. Locate MailChannels.
  4. Once logged in, scroll down to the Email section of your cPanel dashboard.
  5. Click on the MailChannels icon.

    MailChannels icon
  6. Log into MailChannels Dashboard.
  7. Click on the Login button next to the desired domain.

    MailChannels Login
  8. You’ll be redirected to a page where you can manage your inbound filtering settings. Here, you can view mail logs, block senders, whitelist trusted senders, adjust spam filter actions, and review quarantined emails if they are available.

    MailChannels Dashboard

Troubleshooting Tips

Can’t find the MailChannels icon?
If you don’t see the MailChannels option in cPanel, your hosting plan may not include inbound filtering. Contact InMotion Hosting Support to confirm the details of your plan.

Having trouble with spam settings?
If you’re still receiving spam emails, double-check your filter settings. If issues persist, contact our support team for assistance.

]]>
https://www.inmotionhosting.com/support/email/mailchannels/access-mailchannels/feed/ 0 128874
New Features, Twenty Twenty Five Theme Released with WordPress 6.7 https://www.inmotionhosting.com/support/edu/wordpress/wp-releases/wordpress-6-7-release/ https://www.inmotionhosting.com/support/edu/wordpress/wp-releases/wordpress-6-7-release/#respond Tue, 12 Nov 2024 21:41:00 +0000 https://www.inmotionhosting.com/support/?p=128839 Read More >]]>

WordPress 6.7, “Rollins” is released as of November 12, 2024.

This release includes a ton of improvements to the WordPress Block Editor, under-the-hood improvements for Developers to increase performance and interoperability, and incremental changes toward the ultimate goal of enabling a collaborative editing process natively within the WordPress Dashboard.

Twenty Twenty Five, a New Default Theme for Bloggers

Editing the Blog Template in Twenty Twenty Five

The Twenty Twenty Five theme shows off the full capability of the new Site Editor tool. With 9 different built-in styles, 9 color palettes, and 8 typography options, you can mix-and-match to fit your site’s style and make it unique.

The style, palette, and typography options in Twenty Twenty Five

Templates

The theme’s real power comes in the numerous templates available for each content type. Choose dynamic styles for your blog posts page, pages and posts, search results, archives and more.

Choosing templates for content types including Archives, Blog Home, and Search Page in Twenty Twenty Five

Block Patterns

At least 125 block patterns are included in the new theme. Choose patterns from categories like Banners, Calls-to-Action, Galleries, Testimonials and more. These new patterns introduce full page-builder capabilities into the Block editor, giving stiff competition to page builder plugins that have dominated the WordPress landscape for the past years.

Showing off over 125 block patterns included with Twenty Twenty Five

Zoom Out for a Bird’s Eye View of Your Content

While editing pages and posts, a new “Zoom Out” control is introduced so you can get a better view of how your full content coheres together. 

While in zoomed-out view, you can still use the in-editor controls to rearrange your blocks, insert new block patterns, and even “Shuffle” your blocks to rearrange them if you’re feeling lucky.

Zoom out to see more of your page in WordPress 6.7

Better Support for Apple Devices and Images

WordPress 6.7 will include support for the HEIC image format, common on iPhones, iPads, and other Apple devices.

While this image format does not yet have wide adoption in browsers other than Safari, you’ll be able to upload HEIC images directly to the WordPress Media Library and automatically convert them to JPEG. This feature does require server-side support from the iMagick Library, and you can check if your hosting supports it in the Site Health – Info – Media Handling section.

Check Site Health to see if your server supports HEIC images

Improved Query Loop Block

The Query Loop block was introduced way back in WordPress 5.8, but it’s undergone a total overhaul in the new release. The block is meant to be a miniature “blogroll” element, showing a list of Posts or Pages, Custom Post Types, or other content based on user-configurable settings.

The new Query Loop Block is much easier to configure for non-developer users, allowing you to choose from among several Block Patterns and customize “Filters” to show only certain taxonomies or keywords in your block.

The query loop block with content filters showing, including Taxonomies, Authors, and Keywords

Numerous Improvements for Developers

Overall, WordPress 6.7 includes 445 enhancements, 464 Bug Fixes, and 55 Accessibility Improvements.

Notable improvements for Developers include new updates to the Interactivity API and HTML API. Additionally there are numerous improvements to internationalization and language translation.

Plugin Authors will have the new ability to register new templates without relying on complicated filters to interact with users’ themes. This will improve interoperability of plugins with themes so that eventually, plugin and themes won’t have to be designed specifically to account for each others’ usage.

…And all that Jazz

According to tradition, major WordPress releases are named for Jazz Musicians. This release is named in honor of Sonny Rollins, the influential tenor saxophonist whose standards include “St. Thomas” and “Oleo.”

Say goodbye to slow loading times and hello to high-performance websites with our new WordPress VPS Hosting plans. Experience 40x faster WordPress page load speeds on purpose-built servers that guarantee 99.99% uptime.

check markHigh-Performance VPS check markFully-Managed Support check markFree SSL & Dedicated IP check markAdvanced Server Caching

Managed WordPress

]]>
https://www.inmotionhosting.com/support/edu/wordpress/wp-releases/wordpress-6-7-release/feed/ 0 128839
Step-by-Step Guide to Installing React (Updated for 2024) https://www.inmotionhosting.com/support/edu/next-js/install-react/ https://www.inmotionhosting.com/support/edu/next-js/install-react/#respond Fri, 08 Nov 2024 18:48:31 +0000 https://www.inmotionhosting.com/support/?p=128800 Read More >]]> Installing React - Step By Step Guide

React is a popular JavaScript library for building user interfaces, especially single-page applications where dynamic content updates are essential. This guide will walk you through the updated steps to install React using the latest tools like Vite and Next.js and explain why you should use a framework tailored to your needs.

What Is React?

React, developed by Facebook, is a powerful library that makes building interactive and reusable user interface components easier. Its component-based architecture allows developers to create complex UIs by breaking them into smaller, manageable parts. It is widely used for creating single-page applications (SPAs) that update efficiently without full-page reloads.

Why Use React?

  • Component-based: Simplifies UI creation with reusable components.
  • Fast rendering: Optimizes performance through the virtual DOM.
  • Rich ecosystem: Supported by a strong community and a wide range of libraries.

What You Will Need

Before you begin, make sure you have:

  • Node.js: This includes Node Package Manager (NPM), which is necessary for installing React.
  • A code editor: Visual Studio Code (VS Code) is a popular choice.

You can check if Node.js is installed by running the following command in your terminal:

node -v

If Node.js isn’t installed, download and install it from the official Node.js website.

We recommend sticking to a VPS Hosting plan or a Dedicated Server, allowing you to install additional software.

Secure VPS HostingEnjoy high-performance, lightning-fast servers with increased security and maximum up-time with our Secure VPS Hosting!

check markLinux VPS check markcPanel or Control Web Panel check markScalable check markWebsite Migration Assistance

Linux VPS Hosting

Step-by-Step Guide to Installing React

You may still come across tutorials or guides that recommend Create React App (CRA) as a starting point for React projects. However, it is important to note that CRA was deprecated in 2023 due to its outdated build processes and limited capabilities compared to modern tools. Using frameworks like Vite, Next.js, or Remix is now encouraged for new projects.

Step 1: Create a React Application Using Vite

Vite is now a popular choice for React projects due to its fast build times and modern development experience. To create a React app using Vite, follow these steps:

Run the following command in your terminal:

npm create vite@latest my-react-app --template react

Explanation

  • npm create vite@latest initializes a new Vite project.
  • my-react-app is the name of your project, which you can replace with any name you like.
  • --template react sets up the project specifically for React.

Step 2: Navigate to Your Project Directory

Move into your project folder:

cd my-react-app

Step 3: Install Dependencies

Install all necessary project dependencies:

npm install

Step 4: Start the React Application

Start the development server to see your application running locally:

npm run dev

This command opens your React app in your default browser at http://localhost:5173/ (or a different port if 5173 is in use). You should see the default Vite + React welcome page, indicating your setup is complete.

Step 5: Explore the Project Structure

The Vite project structure will look similar to this:

my-react-app/
├── node_modules/
├── public/
   └── index.html
├── src/
   ├── App.css
   ├── App.jsx
   ├── main.jsx
   └── index.css
├── package.json
└── README.md

Key Folders/Files:

  • src/: Contains your React components and main code.
  • public/: Holds static files such as index.html.
  • package.json: Lists dependencies and scripts for your project.

Step 6: Modify Your First Component

Open App.jsx in your code editor and replace the default content with:

function App() {
  return (
    <div>
      <h1>Hello, React with Vite!</h1>
      <p>Welcome to your first React app using Vite.</p>
    </div>
  );
}

export default App;

Save your changes, and your browser will automatically refresh to display the updated content.

Best Practices for Using React

  • Use functional components and hooks: Modern React development favors functional components with hooks (useState, useEffect) for cleaner, more readable code.
  • Keep components small and modular: Design components to focus on a single responsibility.
  • Maintain a clear folder structure: Organize components into subfolders as your app grows.

Choosing the Right React Framework and Build Tools

When deciding how to set up a new React project, it’s crucial to choose the right tool based on your project needs. Here’s an overview of some frameworks and why you might use them, inspired by React’s official recommendations:

  • Vite: Build tool that is ideal for simple, fast setups and development with React. It provides an optimized development experience and quick hot reloading.
  • Next.js: A full-featured framework for building React applications with server-side rendering, static site generation, and API routes. Use this if you need more advanced routing and server capabilities.
  • Remix: Focuses on full-stack web development with a strong emphasis on progressive enhancement and server-side rendering. Consider this for applications that need more robust server interactions.

Each of these frameworks and tools offers a modern, optimized way to start and build React applications with better performance and scalability compared to the now-deprecated CRA.

Conclusion

With the deprecation of Create React App, modern tools like Vite and Next.js provide a more efficient and feature-rich environment for React development. By following this guide, you’ve set up a React app using Vite and learned the essentials for starting your journey in building React applications. Explore these frameworks to find the best fit for your project’s requirements and take your React skills to the next level.

For more tutorials and resources on React, check out our support articles.

]]>
https://www.inmotionhosting.com/support/edu/next-js/install-react/feed/ 0 128800
How to Use Controllers in Laravel https://www.inmotionhosting.com/support/edu/laravel/how-to-use-controllers-in-laravel/ https://www.inmotionhosting.com/support/edu/laravel/how-to-use-controllers-in-laravel/#respond Wed, 21 Aug 2024 20:50:35 +0000 https://www.inmotionhosting.com/support/?p=128620 Read More >]]> How to Use Controllers in Laravel

Laravel is a powerful PHP framework that offers a clean and expressive syntax for web development. Controllers play a critical role in Laravel by handling the logic of your application, responding to user actions, and returning appropriate responses. In this guide, we’ll explore how to effectively use controllers in Laravel, from creating them to using them in your routes.

What are Controllers in Laravel

Controllers in Laravel are classes that handle the logic behind incoming requests and provide the necessary responses. They are typically stored in the app/Http/Controllers directory. Controllers can group related request-handling logic into a single class, making your code more organized and easier to maintain.

Creating a Controller

Laravel provides a simple way to generate controllers using the Artisan command-line tool. To create a new controller, use the following command:

php artisan make:controller MyController

This command creates a new file named MyController.php in the app/Http/Controllers directory. The new controller file will look something like this:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MyController extends Controller
{
    //
}

You can now add methods to this class to handle various routes

Defining Methods in a Controller

Each method in a controller corresponds to a specific route or action in your application. For instance, if you want to handle a GET request to show a list of products, you could define a method like this:

public function index()
{
    $products = Product::all();
    return view('products.index', compact('products'));
}

This index method fetches all products from the database and returns a view named products.index.

Routing to Controller Methods

To direct traffic to a specific controller method, you need to define it in your routes/web.php file:

use App\Http\Controllers\MyController;

Route::get('/products', [MyController::class, 'index']);

This route definition means that when a user visits /products, the index method of MyController will be executed.

Resource Controllers

Laravel also offers a convenient way to handle CRUD (Create, Read, Update, Delete) operations through resource controllers. You can create a resource controller using the following command:

php artisan make:controller ProductController --resource

A resource controller comes with predefined methods for the common CRUD actions:

  • index – Show all items
  • create – Show form to create a new item
  • store – Handle the saving of a new item
  • show – Show a single item
  • edit – Show form to edit an existing item
  • update – Handle the updating of an item
  • destroy – Delete an item

You can register all routes for these actions with a single line in your routes/web.php file:

Route::resource('products', ProductController::class);

This automatically creates routes for all CRUD operations associated with the ProductController.

Middleware in Controllers

Middleware in Laravel provides a way to filter HTTP requests before they reach your controllers. You can assign middleware to a controller method or the entire controller:

class MyController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth');
    }

    public function index()
    {
        // This method is protected by the 'auth' middleware
    }
}

This ensures that only authenticated users can access the index method.

Dependency Injection in Controllers

Laravel’s service container makes it easy to manage dependencies and inject them into your controller methods:

public function show(ProductRepository $repository, $id)
{
    $product = $repository->find($id);
    return view('products.show', compact('product'));
}

In this example, ProductRepository is automatically resolved by the service container and injected into the show method.

Handling Form Requests

Laravel also allows you to validate and process form requests using custom FormRequest classes. You can create a form request class using Artisan:

php artisan make:request StoreProductRequest

This class can be used in a controller method to handle validation:

use App\Http\Requests\StoreProductRequest;

public function store(StoreProductRequest $request)
{
    // Validation is already done by StoreProductRequest
    $validated = $request->validated();

    Product::create($validated);

    return redirect()->route('products.index');
}

Returning Responses

Laravel controllers allow you to return various types of responses:

  • Views: Render a Blade template using the view helper.
  • JSON: Return a JSON response using the response()->json() method.
  • Redirects: Redirect users to a different page using redirect()->route() or redirect()->back().

Example:

public function store(StoreProductRequest $request)
{
    // Save the product
    Product::create($request->validated());

    // Return a JSON response
    return response()->json(['message' => 'Product created successfully']);
}

Using API Controllers

Laravel provides a simple way to build API controllers using the apiResource method, which is similar to resource but optimized for APIs:

Route::apiResource('products', ProductController::class);

API controllers don’t include routes for create or edit, as these operations typically involve forms and are irrelevant in API contexts.

Best Practices

  • Single Responsibility: Ensure each controller method has a single responsibility, making your code easier to maintain.
  • RESTful Structure: Follow RESTful conventions for method names and routes.
  • Use Resource Controllers: Use resource controllers to minimize repetitive code for CRUD operations.
  • Validation: Leverage form requests for validation to keep controller methods clean.

Conclusion

Controllers in Laravel are potent tools that help organize your application’s logic. By following best practices and utilizing Laravel’s built-in features, such as resource controllers and middleware, you can easily create robust, maintainable applications. Whether handling web requests or building APIs, Laravel controllers are vital in delivering a seamless user experience.

Boost your Laravel apps with our specialized Laravel Hosting. Experience faster speeds for your Laravel applications and websites thanks to NVMe storage, server protection, dedicated resources, and optimization tools.

check mark99.99% Uptime check markFree SSL check markDedicated IP Address check markDeveloper Tools

Laravel Hosting

]]>
https://www.inmotionhosting.com/support/edu/laravel/how-to-use-controllers-in-laravel/feed/ 0 128620
Release Update: InMotion Central v3.1 https://www.inmotionhosting.com/support/product-guides/wordpress-hosting/central/releases-updates/platform-i-release-v3-1/ https://www.inmotionhosting.com/support/product-guides/wordpress-hosting/central/releases-updates/platform-i-release-v3-1/#respond Mon, 19 Aug 2024 17:48:36 +0000 https://www.inmotionhosting.com/support/?p=128550 Read More >]]> Managed WordPress Release Update August 2024

August 13, 2024 – Version 3.1 of Managed WordPress Hosting has arrived! This is a major release with many new features, both in the InMotion Central interface and on the Managed WordPress UltraStack VPS.

New Features

The latest version of Central is out with several new improvements including a new look for our UI! Lets explore all the changes and updates.

Language Expansions

We’re thrilled to announce that our site is now available in multiple languages, making it easier for our global users to enjoy an enhanced experience.

You can now access the Central interface in English, French, German, Spanish, and Hindi.

We’re committed to further expanding language options in the future, ensuring inclusivity and accessibility for all our users. Stay tuned for more updates!

Teams and Interface Updates

We’re excited to unveil our new look! With this release, projects are now displayed by Teams, making it easier for you to navigate directly to the projects that matter most to your current team.

We’ve also streamlined the purchasing process to ensure that new plans or additions are always tied to your currently active team, so you can make purchases with confidence.

Should you need to allocate the purchase to a different team, you can effortlessly do so via a convenient drop-down menu. This enhancement is designed to boost efficiency and ensure that purchases are correctly attributed, making your experience with Central even more intuitive and user-friendly.

Team Subscriptions

You can now seamlessly switch between teams by clicking the “My Teams” dropdown located next to your profile photo.

Additionally, we’ve updated the subscriptions page for improved organization. Subscriptions are now sorted by the nearest renewal time, and you can conveniently resize your server directly from the subscriptions page.

Improvements

Domain TLDs Expansion

Version 3.1 introduces new TLDs to our domain search and checkout, giving you even more options when selecting the perfect domain to match your business brand.

We’ve also added an exciting new feature: the “I Feel Lucky” domain spinner, which randomly generates and searches across TLDs for unique domain ideas.

New TLD additions:

  • .ai
  • .attorney
  • .builders
  • .business
  • .church
  • .company
  • .consulting
  • .deals
  • .digital
  • .events
  • .io
  • .me
  • .news
  • .photo
  • .restaurant
  • .services
  • .software
  • .tech
  • .tv
  • .video

Finally, domains now persist in your cart, making your purchasing process smoother and more convenient.

Additional Enhancements

  • Projects: We’ve introduced more user-friendly project names when creating new projects, and we’ve enhanced project navigation and organization for a smoother experience.
  • Playgrounds: Playgrounds are now project-based instead of team-based. Each user now has access to three playgrounds per project.
  • Improved Site Connection: We’ve enhanced the connection between your WordPress site and Central to ensure better communication between your site and Central.
  • Site URL Changes: In this release, we’ve streamlined the Site URL change process by removing a few integrity checks, making it easier for you to complete this task. This update should reduce friction and help ensure more successful completions.
]]>
https://www.inmotionhosting.com/support/product-guides/wordpress-hosting/central/releases-updates/platform-i-release-v3-1/feed/ 0 128550
Form Validation in Laravel https://www.inmotionhosting.com/support/edu/laravel/form-validation-in-laravel/ https://www.inmotionhosting.com/support/edu/laravel/form-validation-in-laravel/#respond Thu, 15 Aug 2024 16:11:37 +0000 https://www.inmotionhosting.com/support/?p=128552 Read More >]]> Form Validation in Laravel

Form validation is a critical aspect of web application development. It ensures that the data submitted by users meets specific criteria before processing. Laravel provides a powerful and easy-to-use validation system that simplifies this process. This article will guide you through implementing and customising form validation in Laravel.

Introduction to Laravel Form Validation

Laravel’s validation system is designed to make validating user input simple and effective. Whether you’re validating simple form inputs or complex nested arrays, Laravel provides all the necessary tools to handle validation efficiently.

Basic Validation Example

Laravel’s most straightforward way to validate a form request is by using the validate method directly in your controller.

public function store(Request $request)
{
    $validatedData = $request->validate([
        'name' => 'required|max:255',
        'email' => 'required|email|unique:users',
        'password' => 'required|min:8',
    ]);

    // Store the validated data...
}

In this example, the validate method takes an array of validation rules. Laravel automatically redirects the user to the previous page if the validation fails.

Laravel’s Documentation contains all available validation rules and their function.

Using Form Request Validation

For more complex validation logic or when you need to reuse validation rules, it’s best to use Form Request Validation. This involves creating a custom request class.

Step 1: Generate a Form Request class

    php artisan make:request StoreUserRequest

    Step 2: Define validation rules in the generated class

    public function rules()
    {
        return [
            'name' => 'required|max:255',
            'email' => 'required|email|unique:users',
            'password' => 'required|min:8',
        ];
    }

    Step 3: Use the Form Request in your controller

    public function store(StoreUserRequest $request)
    {
        // The incoming request is valid...
        // Store the validated data...
    }

    Form Requests provide a clean way to organize validation logic, especially in large applications.

    Customizing Error Messages

    Laravel allows you to customize the error messages returned when validation fails. You can do this using the validation method or Form Request class.

    Inline in the controller

    $validatedData = $request->validate([
        'name' => 'required|max:255',
    ], [
        'name.required' => 'We need to know your name!',
    ]);

    In a Form Request Class

    public function messages()
    {
        return [
            'name.required' => 'We need to know your name!',
        ];
    }

    Custom messages make your application more user-friendly by providing clearer and more descriptive feedback.

    Validating Arrays

    When your form inputs are arrays, Laravel handles the validation seamlessly. For example:

    public function store(Request $request)
    {
        $validatedData = $request->validate([
            'products.*.name' => 'required',
            'products.*.quantity' => 'required|integer|min:1',
        ]);
    }

    In this example, products.*.name ensures that each product in the array has a name attribute, and products.*.quantity checks that the quantity is an integer greater than zero.

    Conditional Validation

    Sometimes, you must apply validation rules conditionally based on another field’s value. Laravel offers an elegant way to handle this.

    public function store(Request $request)
    {
        $validatedData = $request->validate([
            'email' => 'required|email',
            'phone' => 'required_if:contact_preference,phone',
        ]);
    }

    Here, the phone field is required only if contact_preference is set to phone.

    Custom Validation Rules

    Laravel allows you to define custom validation rules if the built-in ones do not meet your needs.

    Create a custom rule

    php artisan make:rule Uppercase

    Define the validation logic

    public function passes($attribute, $value)
    {
        return strtoupper($value) === $value;
    }
    
    public function message()
    {
        return 'The :attribute must be uppercase.';
    }

    Use the custom rule in your application

    use App\Rules\Uppercase;
    
    public function store(Request $request)
    {
        $validatedData = $request->validate([
            'name' => ['required', new Uppercase],
        ]);
    }

    Custom rules allow you to extend Laravel’s validation capabilities to suit your application’s specific needs.

    Displaying Validation Errors

    After validating the form, Laravel automatically redirects back to the form with the error messages stored in the session. You can easily display these errors to the user in your Blade view.

    @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    This snippet will display a list of all validation errors, providing clear feedback to the user.

    Conclusion

    Form validation is essential to any Laravel application, ensuring that the data processed is clean, accurate, and secure. Laravel’s validation system is robust and flexible, making it easy to implement validation logic in your application. Whether using basic validation, custom rules, or conditional logic, Laravel provides all the tools necessary to manage user input effectively.

    Following the guidelines and examples in this article, you can confidently handle form validation in your Laravel projects, ensuring a smooth user experience and maintaining the integrity of your application’s data.

    Boost your Laravel apps with our specialized Laravel Hosting. Experience faster speeds for your Laravel applications and websites thanks to NVMe storage, server protection, dedicated resources, and optimization tools.

    check mark99.99% Uptime check markFree SSL check markDedicated IP Address check markDeveloper Tools

    Laravel Hosting

    ]]>
    https://www.inmotionhosting.com/support/edu/laravel/form-validation-in-laravel/feed/ 0 128552
    How to List Accounts in Control Web Panel (CWP) https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/how-to-list-accounts-in-control-web-panel-cwp/ https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/how-to-list-accounts-in-control-web-panel-cwp/#respond Fri, 02 Aug 2024 17:25:33 +0000 https://www.inmotionhosting.com/support/?p=128468 Read More >]]> How to List Accounts in Control Web Panel

    Managing accounts on your server is crucial to maintaining a secure and efficient hosting environment. Control Web Panel (CWP) provides an intuitive interface for listing and managing user accounts. In this guide, we’ll walk you through the steps for listing accounts in CWP.

    Introduction

    Control Web Panel (CWP) is a web hosting control panel designed to manage dedicated and VPS servers. It offers a wide range of server management features, including the ability to list and manage user accounts easily. Listing accounts in CWP is essential for server administrators to monitor user activity, manage accounts, and ensure server security.

    1. Log into the CWP Admin Panel.
    2. In the left-hand navigation sidebar, click List Accounts under the User Accounts section. Alternatively, you use the Search bar of the navigation sidebar and type “List Accounts”.
      List Accounts Menu
    3. You should now see the List Accounts page showing the accounts created within your server.

    Viewing the List of Accounts

    The List Accounts page will display a list of all user accounts on your server. You can see details such as:

    • Username: The name of the user account.
    • Domain: The primary domain associated with the user.
    • IP Address: The IP address assigned to the user account.
    • Email: The primary email for the user account.
    • Setup Time: The date and time that the account was created.
    • Package: The package assigned to the user account.
    • Reseller: Displays the reseller that owns the user account or if the account has Reseller privileges itself.
    • Disk Usage: The amount of disk space used by the account.
    • Actions: Options to manage the account, including edit, suspend, or delete.

    Managing User Accounts

    Use the buttons under the Actions column of the List Accounts page next to the account you wish to modify. You will see several options:
    List Accounts Actions

    • Suspend Account: Temporarily disable the account.
    • Edit DNS Zone: Edit the Zone file for domains on the user account.
    • Change Password: Change the user account password.
    • Edit Account: Modify the user account settings.
    • Delete Account: Permanently remove the account from the server.

    Conclusion

    Listing and managing user accounts in Control Web Panel is a straightforward process that helps you maintain control over your server’s resources and security. Regularly reviewing your user accounts ensures efficient resource allocation and helps you identify potential security issues. Following these steps, you can effectively manage user accounts on your CWP-managed server.

    Upgrade to VPS Hosting for Peak Performance

    Upgrade to InMotion VPS Hosting today for top-notch performance, security, and flexibility, and save up to $2,412 – a faster, stronger hosting solution is just a click away!

    check markSSD Storage check markHigh-Availability check markIronclad Security check markPremium Support

    VPS Hosting

    ]]>
    https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/how-to-list-accounts-in-control-web-panel-cwp/feed/ 0 128468
    Understanding CSRF Protection in Laravel https://www.inmotionhosting.com/support/edu/laravel/csrf-protection/ https://www.inmotionhosting.com/support/edu/laravel/csrf-protection/#respond Tue, 30 Jul 2024 14:35:14 +0000 https://www.inmotionhosting.com/support/?p=128462 Read More >]]> Understanding CSRF Protection in Laravel

    Cross-Site Request Forgery (CSRF) is an attack in which unauthorized commands are transmitted from a user that the web application trusts. Laravel provides robust CSRF protection out of the box to help secure your application from such vulnerabilities. This article will guide you through the basics of CSRF, how Laravel protects against CSRF attacks, and how to implement and manage CSRF protection in your Laravel applications.

    What is CSRF?

    CSRF (Cross-Site Request Forgery) is an attack that tricks a user into submitting a malicious request. It leverages the fact that a browser automatically includes credentials (like cookies) with each request, enabling an attacker to perform actions on behalf of the user without their consent.

    How Laravel Protects Against CSRF

    Laravel provides built-in CSRF protection to safeguard your application from such vulnerabilities. Here’s how it works:

    1. CSRF Tokens: Laravel generates a unique CSRF token for each active user session. This token is then embedded in every form of the application as a hidden field. The server verifies this token on every request to ensure the request is valid.
    2. Verifying the Token: When a form is submitted, Laravel compares the token submitted with the form against the token stored in the user’s session. If the tokens match, the request is processed. If they don’t match, the request is rejected.

    Implementing CSRF Protection

    Automatically Applied Middleware

    Laravel automatically applies the CSRF protection middleware to all routes defined in the web middleware group. This group is usually defined in the routes/web.php file.

    Adding CSRF Tokens to Forms

    When creating forms, you need to include the CSRF token. Laravel provides a Blade directive for this:

    <form method="POST" action="/your-action-url">
        @csrf
        <!-- Your form inputs -->
    </form>

    The @csrf directive inserts a hidden input field with the CSRF token.

    Handling CSRF Tokens in AJAX Requests

    If you’re making AJAX requests, you need to ensure the CSRF token is included in the request headers. Here’s an example using jQuery:

    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });

    You need to include a meta tag in your HTML to store the CSRF token:

    <meta name="csrf-token" content="{{ csrf_token() }}">

    Configuring CSRF Token Rotation

    For enhanced security, Laravel allows CSRF tokens to rotate after each request. You can enable this in the VerifyCsrfToken middleware:

    app/Http/Middleware/VerifyCsrfToken.php
    protected $shouldRotate = true;

    Disabling CSRF Protection for Specific Routes

    In some cases, such as when developing APIs, you might need to disable CSRF protection for certain routes. This can be done by specifying the routes to exclude in the VerifyCsrfToken middleware:

    app/Http/Middleware/VerifyCsrfToken.php
    protected $except = [
        'api/*',
    ];

    Complete Example of CSRF Protection

    Now that we went over different parts of CSRF protection, let’s look at a complete example:

    routes/web.php
    Route::post('/submit-form', [FormController::class, 'submit']);
    resources/views/form.blade.php
    <!DOCTYPE html>
    <html>
    <head>
        <meta name="csrf-token" content="{{ csrf_token() }}">
    </head>
    <body>
        <form method="POST" action="/submit-form">
            @csrf
            <input type="text" name="name" placeholder="Your Name">
            <button type="submit">Submit</button>
        </form>
    </body>
    </html>
    app/Http/Controllers/FormController.php
    namespace App\Http\Controllers;
    
    use Illuminate\Http\Request;
    
    class FormController extends Controller
    {
        public function submit(Request $request)
        {
            $name = $request->input('name');
            return 'Form submitted by ' . $name;
        }
    }

    This example demonstrates how Laravel protects a simple form from CSRF attacks by verifying the CSRF token embedded in the form.

    Common Issues and Troubleshooting

    Issue: TokenMismatchException

    If you encounter a TokenMismatchException, it usually means the CSRF token is missing or invalid. Here are some steps to troubleshoot:

    • Ensure the @csrf directive is included in your forms.
    • Verify that your AJAX requests include the CSRF token in the headers.
    • Check if the session is correctly initialized and does not expire prematurely.

    Issue: Session Expiration

    If your session expires, the CSRF token will be invalid. Make sure your session lifetime is set appropriately in the config/session.php configuration file.

    'lifetime' => 120, // in minutes

    Conclusion

    CSRF protection is a vital security feature that helps prevent unauthorized actions on behalf of users. Laravel’s built-in CSRF protection is easy to implement and provides a strong defense against CSRF attacks. By following the guidelines in this article, you can ensure your Laravel application is well-protected against these vulnerabilities.

    ]]>
    https://www.inmotionhosting.com/support/edu/laravel/csrf-protection/feed/ 0 128462
    Manage Email Filters in CWP https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-email/manage-email-filters-in-cwp/ https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-email/manage-email-filters-in-cwp/#respond Wed, 17 Jul 2024 17:22:53 +0000 https://www.inmotionhosting.com/support/?p=128379 Read More >]]> Manage Email Filters in CWP

    Email filters are essential for managing incoming emails and ensuring your inbox remains organized and clutter-free. Control Web Panel (CWP) provides robust tools for creating and managing email filters, allowing you to automate email organization based on various criteria. This guide will walk you through setting up and managing email filters in CWP.

    Introduction

    Email filters in CWP enable you to automatically sort incoming emails into specific folders, delete unwanted emails, or forward emails based on defined criteria. This functionality helps you keep your inbox organized and significantly reduces the time spent on manual email management.

    Accessing the Email Filters Section

    1. Log in to the CWP User Panel.
    2. Navigate to Email Accounts: Once logged in, locate the Email Accounts section from the left-hand menu.
    3. Open Email Filters: In the Email Accounts section, click Email Filters to open the email filter management interface.

    Creating a New Email Filter

    1. Manage Filters: Next to the email account you want a filter created, click Manage Filters.
    2. Add Set: Click Add Set or New Filters Set to create a set to add email filters. Enter the Set name and click Save.
    3. Filter Set settings: To manage filters in the set you just created, click the settings button next to it.
    4. Add New Filter: Click the + sign then New Filter or Apply from template (more on Email Filter templates) to create an email filter to the filter set.
    5. Define Filter Criteria: Enter the necessary details for your filter:
      • Filter Name: Provide a name for the filter that clearly describes its purpose.
      • Criteria: Select the criteria for the filter (e.g., Subject, From, To, etc.). Enter the specific text or pattern by which you want to filter.
    6. Set Actions: Choose the actions to be performed when an email matches the criteria:
      • Move to Folder: Select a folder where the email should be moved.
      • Delete: Automatically delete the email.
      • Forward to Email: Forward the email to another email address.
    7. Save Filter: Click the Save button to create the filter.
    8. Turn On Filter: Toggle the Status of the Filter Set to On.

    Creating an Email Filter Template

    Filter templates are useful if a specific set of filter rules and actions needs to be applied to multiple email accounts. By creating the template, you can quickly apply it when managing the email account filter settings. 

    IMPORTANT: Only one filter set can be active at a time. If the user wants to add a filter to an existing set, you will need to create the new filter in the existing active set. 

    1. Filter Templates: Click on the Filter Templates tab from the Email Filters page.
    2. Add New Filter Template: Click on the Add New Filter Template button.
    3. Create the Filter Template: Name the filter template and set the rules and actions for the filter.
    4. Save the Template: Create the template by clicking the Save button.

    Managing Existing Filters

    1. View Filters: In the Email Filters section, you can see a list of all your existing filters.
    2. Edit Filters: To edit a filter, click the Edit button next to the filter you want to modify. Make the necessary changes and save the filter.
    3. Delete Filters: To delete a filter, click the Delete button next to the filter you want to remove. Confirm the deletion when prompted.

    Testing Your Filters

    1. Send Test Emails: Send emails matching your filters’ criteria to your email account.
    2. Check Actions: Verify that the emails are sorted, deleted, or forwarded according to your filter rules.
    3. Adjust Filters if Necessary: If the filters are not working as expected, go back and edit them to refine the criteria and actions.

    Conclusion

    Setting up managed email filters in CWP helps you automate the organization of your emails, ensuring that your inbox remains clean and clutter-free. You can create and manage filters efficiently by following the steps outlined in this guide.

    For more information on using CWP effectively, explore our other Support Center articles and documentation.

    Upgrade to VPS Hosting for Peak Performance

    Upgrade to InMotion VPS Hosting today for top-notch performance, security, and flexibility, and save up to $2,412 – a faster, stronger hosting solution is just a click away!

    check markSSD Storage check markHigh-Availability check markIronclad Security check markPremium Support

    VPS Hosting

    ]]>
    https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-email/manage-email-filters-in-cwp/feed/ 0 128379
    Migrating Accounts from cPanel to CWP https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/migrating-accounts-from-cpanel-to-cwp/ https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/migrating-accounts-from-cpanel-to-cwp/#respond Wed, 10 Jul 2024 03:42:05 +0000 https://www.inmotionhosting.com/support/?p=128335 Read More >]]> Migrating Accounts from cPanel to CWP

    Migrating from cPanel to Control Web Panel (CWP) can offer numerous benefits, including cost savings and enhanced server management capabilities. This guide will provide a comprehensive step-by-step process to ensure a smooth migration from cPanel to CWP.

    Prerequisites

    Before beginning the migration process, ensure that you have the following:

    • Root access to both cPanel and CWP servers
    • A complete backup of all data on the cPanel server
    • CWP installed on the new destination server

    Step-by-Step Migration Guide

    Step 1: Allow Server IPs Through Firewall

    Allow Destination CWP Server’s IP in cPanel Server’s Firewall

    1. Log into WHM as Root.
    2. Navigate to Plugins -> ConfigServer Security & Firewall.
    3. Scroll down to the csf- Quick Actions section and locate the Quick Allow section.
    4. Type the destination CWP server’s IP in the green Allow IP address input box.
    5. Click Quick Allow.

    Allow cPanel Server’s IP in CWP Server’s Firewall

    1. Log into CWP Admin as Root.
    2. Navigate to Security -> CSF Firewall.
    3. Type the cPanel server’s IP in the green Allow IP input box.
    4. Click Quick Allow.

    Step 2: Create Connection

    Generate API Token in WHM

    1. Log into WHM as Root if you are not already logged in.
    2. Navigate to Development -> Manage API Tokens.
    3. Click on Generate Token.
    4. Name your token and set Privileges to Everything.
    5. Click Save and copy the generated token.

    Create Connection in CWP

    1. Log in to your CWP Admin Panel.
    2. Navigate to User Accounts -> cPanel->CWP Migration.
    3. Enter the remote cPanel server’s IP address, username (root), root password, SSH port, and API token you previously copied.
    4. Click Test & Save to save the connection details.

    Step 3: Select Accounts to Migrate

    View Remote Server Details

    1. In CWP, click on the configured remote server from the Remote Server List.
    2. View the available packages and accounts on the cPanel server.

    Choose Accounts for Migration

    1. Check the boxes next to the accounts and packages you wish to migrate.
    2. Review the selected accounts and packages to ensure accuracy.

    Step 4: Start Migration

    Initiate Migration Process

    1. Click the Start Migration button.
    2. Monitor the migration progress in real-time via the progress bar and status messages.

    Verify Migration

    1. Once the migration is complete, log into the CWP server and check the migrated accounts.
    2. Verify that all websites, emails, and databases are functional.

    Troubleshooting Common Issues

    Connection Errors

    • Ensure the API token and server details are correct
    • Verify that both servers are running.
    • Ensure the servers’ IPs are added to each other’s firewall as described in Step 1.

    Incomplete Migrations

    • Double-check the selected accounts for migration
    • Re-run the migration process for any accounts that failed.

    Post-Migration Best Practices

    • Verify DNS Settings: If necessary, update DNS records to point to the new CWP.
    • Test Thoroughly: Check all websites, email accounts, and databases to ensure everything is functioning correctly.
    • Regular Backups: Implement a regular backup schedule on the new CWP server to prevent data loss.

    Upgrade to VPS Hosting for Peak Performance

    Upgrade to InMotion VPS Hosting today for top-notch performance, security, and flexibility, and save up to $2,412 – a faster, stronger hosting solution is just a click away!

    check markSSD Storage check markHigh-Availability check markIronclad Security check markPremium Support

    VPS Hosting

    ]]>
    https://www.inmotionhosting.com/support/edu/control-web-panel/cwp-admin/user-and-account-management/migrating-accounts-from-cpanel-to-cwp/feed/ 0 128335