Category: PHP

How to disable the comments in WordPress?

To disable comments in WordPress, Please follow below steps

  • Step 1: Login to your WordPress admin panel.
  • Step 2: Go to the Settings menu.
  • Step 3: Under Settings menu click on Discussion.
  • Step 4: Uncheck Allow people to post comments on new articles. checkbox
  • Step 5: Click on save changes button, you done

How to disable password reset in WordPress?

There are a few ways you can do it that are more user-friendly than allowing the user to think they have requested a password reset. WordPress has a filter allow_password_reset see documentation

Simply add the following to your theme functions.php file

function wp_disable_password_reset() { return false; }
add_filter ( 'allow_password_reset', 'wp_disable_password_reset' );

If a user attempts to reset their password they will receive the error message

Password reset is not allowed for this user

Reset Mautic admin password via SSH

If you have ssh access to your mautic server you can do the following:

  1. Type this command: sudo mysql -u root
    This will log you into mysql,
  2. then type: show databases;
    This will show you your databases, usually Mautic default install uses DB name mautic,
  3. Type: use mautic; (you can replace the name of the database if you have a different name)
  4. Type: select id, username from users;
    This will give you a list of users
  5. Type: UPDATE users SET password = “a5b253d8484925a3b4fba260768416dfdcbeaed639bb3435c566cbf54721f846903725c7283cf9ab1f090f179d015f46a50b5e798695547eda6e2342db8918a2” where id = 1; make sure you are using the id of the user you want to update.

Now you should be able to login with password 12345678.

Hope that works

How to install Plugins in Mautic?

  1. Log in to the application as an administrator.
  2. Click the gear icon at the top right corner of the dashboard, and select the “Plugins” menu item.
  3. Click the “Install/Upgrade Plugins” button.
  4. Mautic plugin configuration.
  5. Select the integration to be installed and configure it with necessary information, such as client IDs and secrets.
  6. To add custom plugins to Mautic, upload your plugin via FTP or some other protocol to the Mautic plugins directory.

How to install Mautic in localhost?

  1. Open a Terminal/Console window.
  2. Change directory to the server root (i.e. cd /var/www if your local server root is at /var/www).
  3. Clone the repository (git clone https://github.com/mautic/mautic.git)
  4. The mautic directory should appear in the server root. Change directory to mautic directory cd mautic.
  5. Install dependencies composer install.
  6. Run “composer update” command in the Terminal/Console window.
  7. Visit Mautic in a browser at http://localhost/mautic and follow onscreen installation steps.

What is the server requirements for YII 2?

  • Linux Server Hosting
  • PHP version – PHP 5.4.0 or higher is required.
  • Reflection extension is required.
  • PCRE extension is required.
  • SPL extension is required.
  • Ctype extension is required.
  • MBString extension is required.
  • GDextension is required.
  • OpenSSL extension – Required by encrypt and decrypt methods.
  • Intl extension – HP Intl extension 1.0.2 or higher is required
  • ICU version – ICU 49.0 or higher is required
  • ICU Data version – ICU Data 49.1 or higher is required
  • Fileinfo extension – Required for files upload to detect correct file mime-types.
  • DOM extension – Required for REST API to send XML responses via yii\web\XmlResponseFormatter.
  • IPv6 support – PHP must support IPv6 protocol stack.

What is the server requirements for Codeignator 4?

  • PHP version 7.3 or newer is required
  • The following PHP extensions should be enabled on your server:
    • intl
    • mbstring
    • php-json
    • php-mysqlnd
    • php-xml
  • Codeignator 4 supported databases are
    • MySQL (5.1+) via the MySQLi driver
    • PostgreSQL via the Postgre driver
    • SQLite3 via the SQLite3 driver
    • MSSQL via the SQLSRV driver (version 2005 and above only)

What is the server requirements for Laravel 8+?

The Laravel framework has a few system requirements. You can find the list of server requirements below

  • PHP >= 7.2.5
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

How to install downloaded WordPress theme in XAMPP?

To install a theme manually via XAMPP do the following:

Step 1: Locate XAMPP’s htdocs folder. This is normally Applications>>XAMPP>>HTDOCs on Mac or My Computer>>C:>>XAMPP>>HTDOCs on Windows (I think – someone might need to correct me on that).

Step 2: If your site is installed in a sup-directory in htdocs, go there. If not skip to next step.

Step 3: Open the wp-content folder

Step 4: Open the themes folder

Step 5: Copy in your downloaded theme and extract it there (if its zipped)

Step 6: Go to your WordPress Dashboard and go to the Appearance button on the left and click Themes from the drop down. Find your newly installed theme and hit Activate.

How to Install XAMPP and WordPress Locally on Windows PC

Step 1: Download and install XAMPP on your computer
Step 2: Start Apache and MySQL modules and test your server
Step 3: Create new project folder in C:\xampp\htdocs
Step 4: Download WordPress from WordPress.org website and extract the zip file.
step 5: Upload the files in new project folder.
step 6: Create a database for WordPress.
step 7: Install WordPress locally via the on-screen installer(http://localhost/newprojectfolder).