In my wp-config.php file, I have the line: define('DISALLOW_FILE_EDIT', true); I always include this on all sites as standard, and it's always worked exactly as expected. However, I've only just noticed that on one client's site, it has stopped working. They have the User Role Editor plugin that was set up to define a handful of custom roles. Once the roles were set up, the plugin was deactivated (it doesn't need to be active for the roles to exist) and …
I installed WordPress from a zip file via FTP, followed the install procedure exactly - When accessing the URL, all I could see is a default page without opening any install script. I then manually entered https://"mysite".com/wp-login.php and it opened a login window. I entered the username and PW I created in wp-config.php - I was advised no such user- double checked everything and found no errors I could determine. I'm guessing that the problem is something in either database …
I want to change the upload directory for Wordpress from project.dev/wp-content/uploads to cdn.project.dev Where subdomain cdn has DocumentRoot: HostPath/project.dev/cdn while Wordpress is located at HostPath/project.dev/public_html Any help is much appreciated.
Any time I create a new site on my multisite install, I get an infinite loop redirect when navigating to that site's admin. I'm using the default htaccess supplied by WP for my subdirectory install. Here's what I have: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) site/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ site/$2 [L] RewriteRule . index.php …
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 …
whewn ever i try to login http://affiliatesurge.com.au/wp-admin/ i got "" Warning: Cannot modify header information - headers already sent by (output started at /home/affiliat/public_html/wp-config.php:1) in /home/affiliat/public_html/wp-includes/pluggable.php on line 881 "" Error ... i already try removing spacing in wp-config and functions.php
for the wordpress deployment purpose I have added the following code in wp-config.php file define( 'WP_HOME', 'http://example.com'); define( 'WP_SITEURL', 'http://example.com'); I did not make any changes in wp-option table. there its shows localhost url. I don't want to change here every time. so I tried to override using wp-config file. issues is: it is not working on server. all the images are showing with localhost url
Probably a dumb question... the hardening doc suggests setting up your web server so that it prevents access to wp-config.php. If you do this, and a client tries to access the file, Apache returns 403 Forbidden, as expected. If you don't do this, Apache returns 200 Ok with an empty file. This is also as expected, because none of the php code in this file produces any output. So what's the point? Surely this would only be an issue if …
I'm auto-generating WordPress (5.9.3) sites on a VPS. I could, as part of the generation script, create random strings for the various keys and salts in wp-config.php. However, there doesn't appear to be any unequivocal statement in the docs that this is actually necessary, and various sources appear to state that WP will generate the keys and salts anyway if there are none in wp-config.php. Two questions: If I choose to leave this up to WP, what should I actually …
this issue needs a bit of backstory and I'm not sure on how to fix this. I had a server running Apache and PHP 5.4, I moved to a vps using NGINX and PHP 7.4. Right now I'm getting errors saying ABSPATH is not defined (the directory has changed). These are the errors: [04-Apr-2022 14:38:47 Europe/Berlin] PHP Warning: require(ABSPATHWPINC/option.php): failed to open stream: No such file or directory in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-includes/functions.php on line 8 [04-Apr-2022 14:38:47 Europe/Berlin] PHP Fatal error: require(): …
I came across this site and I was wondering why WordPress isn't using this as default: define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME']); define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']); So nobody has to change this values when changing the domain. Is there any reason or disadvantages of using this?
I've a WordPress installation that I've transformed into a multisite network. I'm using cPanel and I've followed all the instructions to configure the WordPress installation. I've set up the subdomains mode, so for every new website I need to create a subdomain using cPanel of my shared hosting provider. The problem is that I get a 403 error every time I try to access to a subdomain website. How I can fix this and is the .htaccess code correct? NB: …
First off, I'm a WordPress noob, so I apologize if there is an easy solution. I'm trying to get a live website working on my local MAMP environment. I've successfully cloned the git repo into the htdocs directory in MAMP. I also also created a database within phpmyadmin called 'landing'. Once the database was created, I imported a fresh copy of the production site's database. After the database was set up, I renamed the wp-config-example.php file to wp-config.php and added …
I have several WordPress sites that I want to enable auto update. I installed Background Update Tester to verify that the updates were enabled correctly, but I get the following message: FAIL: The AUTOMATIC_UPDATER_DISABLED constant is defined as true. It was defined as true in wp-config.php, but after I removed the line, it's still saying that the constant is true. I also tried to define the constant as false to no avail. I also tried to add this filter inside …
I always knew that WordPress uses utf8_general_ci as tables collation, but recently it keeps installing utf8mb4_unicode_520_ci. What I do is: Download WordPress from wordpress.org Rename wp-config-example.php to wp-config.php Set the defined constants as below /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', 'utf8_general_ci'); Set database configuration properly and create an empty database with charset and collation as above. Open mysite.dev where the WordPress …
I'm setting up an install of Wordpress on our server instances which are hosted with AWS. Of course, everything that's on our servers is in version control with git and there is no FTP so uploading anything like media or plugins directly to our servers is a no go. What I'd like to do is host the core Wordpress files on our servers but save uploads on an external server. Ideally, this would be all of wp_content/ but I'd settle …
I have seen this question PHP Memory Limit vs. WP Memory Limit and it has a really poor answer and the question isn't that good either. I am on a dedicated server and can do whatever I want. I want to make sure our site runs as fast as possible and had define( 'WP_MAX_MEMORY_LIMIT', '1024M' ); in our config. But then our theme had an update and I saw a screen that showed our PHP memory was 1024MB and our …
I'm suffering with this problem for two days. Here is my envroiment: I"m using Amazon EC2 with Ubuntu 16.04, I've installed LAMP, phpmyadmin, vsftpd and that's all. Then I've configured one clean Wordpress installation and everything is working fine with my main site. But, when I've setup a Multisite, whenever I try to access the Dashboard of any subsite beside the primary one, in Chrome, it results in "ERR_TOO_MANY_REDIRECTS". In other browsers, I got similar issues. Its not a browser …
thanks in advance for any advice! My client has a live site currently hosted on GoDaddy. I am developing a redesigned site for him on Local. I don't like working on GoDaddy and have advised him to move the new site to a new webhost when it's time to take the new site live. I have set up a staging site on the new webhost so we can both easily make revisions to it. The new site is an entirely …
I have made wordpress pages on divi builder on m localhost and they were working fine without any problem but when i installed divi on my online website its giving me the error Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes) I tried changing the define( 'WP_MEMORY_LIMIT', '40M' ); in both my wp-config and default-constants.php file but its still giving the same error! This error appears when ever I open my homepage. I searched …