Category: Technology

  • how to install wordpress in cpanel

    Step 1: Access cPanel

    Log in to your cPanel account using the credentials provided by your hosting provider, typically via yourdomain.com/cpanel.

    Step 2: Create a Database

    1. In cPanel, go to the Databases section and click MySQL® Database Wizard or MySQL Databases.
    2. Create a new database:
      • Enter a database name (e.g., wp_database).
      • Click Create Database.

    Step 3: Add a New User

    1. In the MySQL Databases section, find MySQL Users and click Add New User.
    2. Enter a username (e.g., wp_user) and a strong password.
    3. Click Create User.

    Step 4: Add User to Database with Permissions

    1. In the MySQL Databases section, go to Add User to Database.
    2. Select the user (e.g., wp_user) and the database (e.g., wp_database).
    3. Click Add, then check ALL PRIVILEGES in the permissions window.
    4. Click Make Changes to save.

    Step 5: Download WordPress Files

    1. Visit the official WordPress website and download the latest WordPress ZIP file.
    2. Save and extract the file to your computer.

    Step 6: Upload Files to cPanel

    1. In cPanel, go to File Manager under the Files section.
    2. Navigate to the folder for WordPress installation (e.g., public_html for the main domain or public_html/blog for a subdirectory).
    3. Click Upload, select the extracted WordPress ZIP file, and upload it.
    4. Extract the ZIP file in the folder, moving the contents of the wordpress folder to the root of your chosen directory if needed.

    Step 7: Configure wp-config.php

    1. In File Manager, find the wp-config-sample.php file in the WordPress folder.
    2. Edit the file to add your database details:
      • Replace database_name_here with your database name (e.g., wp_database).
      • Replace username_here with your database user (e.g., wp_user).
      • Replace password_here with the user’s password.
      • Ensure DB_HOST is set to localhost (or confirm with your host if different).
    3. Save the file and rename it to wp-config.php.

    Step 8: Run the WordPress Installer

    1. In your browser, go to your domain (e.g., yourdomain.com or yourdomain.com/blog).
    2. The WordPress installation screen will appear. Follow the prompts:
      • Select a language.
      • Enter your site title, admin username, password, and email.
      • Click Install WordPress.
    3. Log in to the WordPress admin dashboard at yourdomain.com/wp-admin.

    Step 9: Create an Article in WordPress

    1. Log in to WordPress: Access the dashboard at yourdomain.com/wp-admin.
    2. Navigate to Posts: Click Posts > Add New in the left-hand menu.
    3. Add a Title: Enter a title, e.g., “My First Blog Post”.
    4. Write Content: Use the block editor to add content. For example:
      • Add a Paragraph block: “Welcome to my blog! This is my first article about WordPress.”
      • Add an Image block: Upload an image to enhance the post.
    5. Set Categories/Tags: In the right sidebar, add a category (e.g., “Blog”) and tags (e.g., “WordPress, Tutorial”).
    6. Add a Featured Image: Upload an image in the sidebar under the Post tab.
    7. Publish: Click Publish to make the article live, or save as a draft to edit later.
  • Menu- how to add menu to wordpress

    To add a menu in WordPress, follow these steps:

    1. Go to your WordPress dashboard and navigate to Appearance > Menus.
    2. Click “Create a new menu.”
    3. Enter a name for your menu, then click Create Menu.
    4. Add items to your menu by selecting pages, posts, custom links, or categories from the left side and clicking “Add to Menu.”
    5. Arrange the menu items by dragging and dropping them into your preferred order.
    6. To make it your site’s main navigation, select a Display Location (such as “Primary Menu”) in the “Menu Settings” section.
    7. Click “Save Menu.”
  • what is wordpress ? and difference between wordpress.com and wordpress.org

    WordPress is one of the most widely used platforms for building websites and blogs worldwide. Since its launch in 2003, WordPress has grown tremendously and now powers over 40% of all websites on the internet.

    In this article, we’ll explore what WordPress is, how it works, its features, pros and cons, and why it remains the top choice for individuals, businesses, and developers.


    1. What is WordPress?

    WordPress is an open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. It allows users to create, manage, and publish digital content on the web easily, without needing to write complex code.

    Originally created as a blogging platform by Matt Mullenweg and Mike Little, WordPress has evolved into a full-featured CMS capable of powering complex websites, including online stores, portfolios, news portals, membership sites, and more.


    2. Types of WordPress

    There are two main versions of WordPress:

    WordPress.org (Self-hosted WordPress)

    • You download WordPress software from WordPress.org.
    • You install it on your own web hosting server.
    • You have full control over customization, plugins, themes, and code.
    • Requires you to manage your hosting, backups, and security.
    • This version is free to use (open source), but you pay for hosting, domain, and premium themes/plugins if needed.

    WordPress.com (Hosted WordPress)

    • A commercial platform powered by Automattic (the company behind WordPress).
    • Hosting and maintenance are managed for you.
    • Easier to start but limited in terms of customization and plugins in free or lower-tier plans.
    • Paid plans unlock more features, themes, and the ability to install plugins.
    • Good for beginners or users who want minimal management.

    3. Key Features of WordPress

    • User-Friendly Interface: Intuitive dashboard for creating pages, posts, and managing your website.
    • Themes: Thousands of free and premium themes to change the website’s design instantly.
    • Plugins: Extend functionality easily by installing plugins (contact forms, SEO tools, eCommerce, etc.).
    • SEO Friendly: Built with search engine optimization in mind and supported by many SEO plugins.
    • Media Management: Upload and manage images, videos, audio, and other files.
    • Responsive Design: Most themes are mobile-friendly out of the box.
    • Multilingual Support: Can create websites in multiple languages.
    • User Roles and Permissions: Manage contributors, editors, admins with different access levels.
    • Community and Support: Huge community, forums, tutorials, and developer ecosystem.

    4. How Does WordPress Work?

    WordPress combines PHP scripts and a database to dynamically generate web pages.

    • When a visitor requests a page, WordPress uses PHP to pull content from the MySQL database.
    • It combines the content with the active theme’s template files.
    • It then sends the resulting HTML to the visitor’s browser.

    This dynamic system means you can update content without changing the site’s code.


    5. What Can You Build with WordPress?

    WordPress is extremely versatile and can be used to build:

    • Blogs and Personal Websites
    • Business Websites and Portfolios
    • Ecommerce Stores (using WooCommerce plugin)
    • Membership Websites
    • Forums and Community Sites
    • Online Courses and Learning Platforms
    • News and Magazine Websites
    • Event Booking Sites
    • Multilingual Websites

    The only limit is your creativity and technical skills.


    6. Pros and Cons of WordPress

    Pros

    • Free and Open Source
    • Highly Customizable
    • Large Ecosystem (Themes & Plugins)
    • Strong SEO Capabilities
    • Easy to Use for Beginners
    • Scalable for Large Websites
    • Strong Community Support

    Cons

    • Can Be Vulnerable to Security Issues if not updated properly.
    • Performance May Slow Down with many plugins or poor hosting.
    • Learning Curve for Advanced Customization
    • Need to Manage Hosting and Backups (if self-hosted)
    • Frequent Updates Required

    7. Who Uses WordPress?

    WordPress is used by:

    • Individuals for personal blogs.
    • Small businesses for their websites.
    • Large enterprises like BBC America, The Walt Disney Company, Microsoft News, and more.
    • Ecommerce businesses using WooCommerce.
    • Nonprofits and educational institutions.

    8. Getting Started with WordPress

    If you want to create a website with WordPress:

    1. Choose Your WordPress Version: Hosted (wordpress.com) or self-hosted (wordpress.org).
    2. Get a Domain Name and Hosting: If self-hosted, buy a domain and web hosting.
    3. Install WordPress: Many hosts offer one-click installation.
    4. Select and Customize a Theme: Free or premium.
    5. Add Plugins: For SEO, security, forms, ecommerce, etc.
    6. Create Pages and Content: Start publishing posts, pages, media.
    7. Manage and Maintain: Keep WordPress, themes, and plugins updated for security.

    9. Conclusion

    Whether you want a simple blog or a complex eCommerce store, WordPress offers the tools and community to make it happen. With continuous development and a passionate community, WordPress will likely remain a dominant CMS for years to come.


  • fix jwt auth bad config wordpress rest api wp-json/users/me

    If you’re integrating the WordPress REST API and using the JWT Authentication plugin for WP REST API, you might run into a common issue: although you’re able to obtain a token successfully, trying to fetch user data via the /wp-json/wp/v2/users/me endpoint returns the following error:

    {
    “code”: “jwt_auth_bad_config”,
    “message”: “JWT is not configured properly, please contact the admin”,
    “data”: {
    “status”: 403
    }
    }

    Cause of the Issue

    This error typically occurs due to incorrect placement of the JWT configuration constants in your wp-config.php file. The plugin expects certain constants—such as your JWT secret key and CORS-related headers—to be defined before WordPress is fully loaded.

    ✅ Solution

    To fix this issue, follow these steps:

    1. Open your wp-config.php file.
    2. Move the JWT-related constants to the top of the file, immediately after the opening <?php tag, and before the line that says /* That’s all, stop editing! Happy publishing. */.