Plugin to install a plugin

You can take a look at TGM-Plugin-Activation plugin. It should give you good starting point. As written in the documentation: TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular … Read more

Failed to open stream / no such file or directory

It could be 2 things Most like it’s your file permissions. It is probably that your apache isn’t able to open the files set files to 0644 and directories 0755. The other problem could be your php version. Since you are upgrading to a new server, why not get the php in version 7? php … Read more

What is $tab in `install_plugins_{$tab}` hook?

If you go to the plugin-install.php inside the WordPress dashboard, there may be many tabs: wp-admin/plugin-install.php?tab=featured wp-admin/plugin-install.php?tab=popular wp-admin/plugin-install.php?tab=recommended … Here is the function you referenced: File: wp-admin/plugin-install.php 145: /** 146: * Fires after the plugins list table in each tab of the Install Plugins screen. 147: * 148: * The dynamic portion of the action … Read more

WordPress package configuration in Ubuntu Server?

The code you posted is to have multiple wp-config.php-style wordpress configuration files with one codebase. the configuration is then based on the domain name. imagine the localserver is listening on http://localhost.localdomain/ (no idea which one is the default with ubuntu), then the configuration file would be: /etc/wordpress/config-localhost.localdomain.php. This is made so that the wordpress package … Read more

WordPress redirect loop on nginx + apache reverse proxy

Issue was caused by nginx serving example.com/index.php while WordPress was redirecting to example.com/, thus causing a redirect loop. This is the working config I used to fixed the redirect loop: server { server_name example.com; root /var/www/example.com; index index.php; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { try_files $uri @apache; … Read more