I am in need of a function that automatically generates and returns salts for Wordpress wp-config.php (Don't link me to their API, I'm looking for offline solution). Does Wordpress core has this function defined somewhere? If it doesn't, can these salts be generated randomly or are there any specific rules for creating them? Edit: This is what I ended up with: $keys = array('AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT'); $salts = ''; foreach ($keys as $key) { $salt …
After our hosting provider moved our site to a new Windows 2016 server I have been struggling with an intermittent error: PHP Notice: Undefined index: a:1:{s:3:"ssl";b:1;} in E:\WebContent\site-name\wp-includes\class-requests.php on line 213 We see this occasionally on the login screen. A refresh of the browser will usually fix it. The rest of the site seems to be running fine. This happens EVERY TIME when I try to update plug-ins or WordPress. Based on reading many posts, it seems to be an …
I installed WordPress on Debian using this article from the Debian Wiki. My wp.conf looks like Alias /wp/wp-content /var/lib/wordpress/wp-content Alias /wp /usr/share/wordpress <Directory /usr/share/wordpress> Options FollowSymLinks AllowOverride Limit Options FileInfo DirectoryIndex index.php Require all granted </Directory> <Directory /var/lib/wordpress/wp-content> Options FollowSymLinks Require all granted </Directory> since I couldn't get the virtual host config file to work. This makes the site visible under mydomain.com/wp. How can I make the site visible at mydomain.com? I tried changing the site URL, but that made …
This is my first time working on Wordpress and accessing site locally. The Wordpress site is on the github and I tried to pull the codes from there and accessing site already to my local machine but when I tried to access the site locally it always saying "Error establishing a database connection" I already checked DB_NAME, DB_USER and DB_PASSWORD inside wp-config.php and already created a database inside phpMyadmin locally and imported the DB from github but still the problem …
Is there a way install WordPress without configuring it manually on configuration screen? For example, by providing configurations in configuration file? I'm talking about configuration as code fashion. Once webserver and db is up, WordPress is already configured using configuration file settings. So, WordPress admin page is immediately will be available after raising up the webserver.
A few times now, our site's DOMAIN_CURRENT_SITE constant, stored inside wp-config.php has been overridden by what appears to be a reverse DNS of our sites IP address... Since we use AWS elastic IPs, this turns out to be something like aws.12345146.someothertext.aws.com instead of www.ourdomain.com. When this happens, the site becomes unreachable. The DOMAIN_CURRENT_SITE value needs to be reverted, and we also need to run a few updates on the database to restore some urls there. The last two time this …
Is there a way to apply a global setting, so that get_template_part always uses a predefined base path? For example, I always put my templates in a directory called 'template-parts', and it'd be nice to not have to always include that in the first argument string. I know I could probably call a custom function that calls get_template_part, but I was wondering if there was a slightly more elegant way of doing it.
As the title of the question says, I would like only specific admin users to receive the new registration emails. Is it possible to restrict which admin user receives it? Currently all admin users will receive an email notification. I don't want to disable it globally but only on a per user basis.
Need help understanding "Provide your own webpack config" https://developer.wordpress.org/block-editor/packages/packages-scripts/#provide-your-own-webpack-config const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); module.exports = { ...defaultConfig, entry: { ...defaultConfig.entry, //index: path.resolve( process.cwd(), 'src', 'index.js' ), slider: path.resolve( process.cwd(), 'src', 'slider.js' ), }, }; I am trying here to add a new scipt to the buid folder from src folder while developing a gutenberg block I get error: ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: `wp-scripts start` npm ERR! Exit status 1 npm ERR! …
Are there any best practices for wordpress hardened install on Linux? I have recently had a WAMP server get malware attacked via word press so I want to harden the server up using read only apache permissions and move them and all future wordpress sites to Linux only the plan: chown everything root:root -R so that apache can't write to anything chmod so that only owner can write chown only the uploads / updated files/ themes/ dirs of wordpress to …
I have a server using Apache and PHP-FPM. The server hosts several WordPress sites with each site running as a different user and using a different pool. I'm trying to configure the post_max_size and upload_max_filesize directives on a per-site basis by placing a .user.ini file in each site's document root. I know that the .user.ini file is being read because phpinfo() displays local values from the .user.ini file and master values from the main php.ini file. I've confirmed this using …
If a plugin uses some script (prominent example: jQuery UI Datepicker), but you're not happy with how the script renders the output, then there're two possibilities: 1. Unregister the script > Add your own version So first you'd need to check the handle, then find the priority and the hook (wp_enqueue_scripts, login_enqueue_scripts, etc.) ... you know the drill. 2. Change the jQuery plugin parameters Normally - if the plugin isn't crap - it pushes through the parameters from PHP to …
I hired a sysadmin to set up a VPS server for me and, unfortunately, it looks like things were not set up correctly. When trying to install and update plugins, I run into permissions errors all the time. WP Super Cache is the main issue as it causing my readers to run into 502 errors. Currently, my site does not load pagination (no Page 2, Page 3, etc..). 12/1 Update: The apache server has restarted itself multiple times today and …
We have IIS 7.5 and we've installed WordPress (v3.3.1) through the Microsoft Web Platform installer (http://www.microsoft.com/web/wordpress). All works fine when we load WP locally (e.g. http://localhost/mywordpresssite), the graphics load fine. But when I enter the IP address or hostname accessing the site from a machine other than locally, none of the graphics or formatting appear. Is there some configuration I have to set to get this working? I've noticed that all the graphics etc. are hard-wired to 'localhost', which explains …
Please note this is my first post here. Not sure if this question fits in the scope of this site. If not, I am happy for it to be closed. I have a Synology NAS and I want to start a personal website using Wordpress. I have registered for a domain at noip.com and have installed Wordpress on my NAS (along with all the other required packages). noip is redirecting port 80 (which is blocked by my isp) to port …
I'm migrating a wordpress site from one server to another. I just finished setting up NGIX, PHP, MySQL, etc... however I still haven't restored the old DB on this new server. I can see the site goes up, but it takes me to the "wp-admin/install.php" page. Isn't this configuration supposed to stored within the Wordpress files I copied? or will it set up properly once I restore the old DB? Sorry for the newbie question.
My Server Env for a wordpress site is as follows: ---------- --------- ------------- | Client | <-- HTTPS --> | Proxy | <-- HTTP --> | Wordpress | ---------- --------- ------------- The Problem is that the Wordpress Site itself is served internally over HTTP but the Client communicates over HTTPS with the Proxy. Since Wordpress is configured with HTTP it returns links and images-src with "http://" which leads to mixed-content errors in the browsers. (Eg. all css / script links …
I remember (it seems...) there was a way, maybe some config option, to combine/merge javascript files (for production sites). I mean just with vanilla wordpress code, not plugins. Am I wrong? If not, how to? Can't find reliable infos.
I'm trying to create a fully managed hosting package for my customers within whmcs without giving them cPanel and WordPress admin credentials. Ideally, upon purchase of a hosting package in whmcs, I'd like for two credentials to be created: the admin credential to be sent to me (the designer/hosting provider) and a user with the WordPress Editor role to be sent to the customer. I found the tutorial for setting up the Softaculous auto-installer in whmcs, but I'm not sure …