Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [wp-config]

wp-config.php is the configuration file of WordPress, one of few that is not overridden during upgrades. It is essential for running WordPress, as it contains the information needed to connect to the database

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Could not override the url in wp-config file

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 ...
user avatar
1 vote
1 answer
40 views

What's the point of forbidding access to wp-config.php?

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 ...
user avatar
  • 25
1 vote
1 answer
169 views

Is there any point setting the keys and salts in wp-config.php?

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 ...
user avatar
  • 25
0 votes
0 answers
32 views

ABSPATH not defined?

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 ...
user avatar
  • 1
0 votes
1 answer
32 views

How to stage a redesigned site on a new webhost while the original site is still live? [closed]

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 ...
user avatar
0 votes
1 answer
64 views

Extending a custom framework built into WordPress to automatically turn the 'Search Engine Visibility' setting ON / OFF, dependant on environment

I have a WordPress framework that I am currently working in, it is a thing of beauty, however it is not what I am used to. I am attempting to extend this framework to automatically turn the toggle (...
user avatar
0 votes
0 answers
67 views

WordPress login redirection not working on Nginx root directory

i have a wordpress site which redirects me to previous page from where login is requested. it works perfectly fine on apache web server and accessible on http://localhost/wp and when i moved from ...
user avatar
0 votes
0 answers
15 views

Advanced Wordpress Search with multi values of a single term

I have a custom field named Sizes , small, medium, large, extra large, so a given post may have multiple option selected for Size parameter, a user can select multiple options for a post from this ...
user avatar
1 vote
3 answers
447 views

Wordpress (behind HAProxy and Jetty), not multisite, in sub folder - and /en/wp-admin/ keeps redirecting to /wp-admin/

I am using an unusual setup to host 3 Wordpress installations on CentOS 8 Linux. In front I have HAProxy (to offload TLS), then I have Jetty configured for FastCGI and php-fpm and finally Wordpress. I ...
user avatar
0 votes
1 answer
274 views

What conditions must be met in order to upload .zip file to a multisite Wordpress installation?

I cannot upload .zip files to my Wordpress network, despite making IMHO everything that is needed. I am still hit by this irritating error. Details: I am a super-admin in my network. The ...
user avatar
  • 320
2 votes
1 answer
230 views

Get WP CLI to hide debug warnings and notices in JSON output, same setting as website

Summary: WP CLI can be used to get a JSON output of all the plugins installed on a site, but the output gets corrupted due to warnings although log levels are set to low. Problem Unfortunately, I have ...
user avatar
0 votes
0 answers
42 views

Wordpress Multisite Shared Cookies with Multiple domains

I have a strong feeling you can no longer do this, but here it goes. I've got a WordPress Multisite using two domains (For our example: domain-one.test and domain-two.test). I would like shared user ...
user avatar
1 vote
1 answer
34 views

AWS Wordpress Install - pages/posts 404 on restart until updating permalinks

I have launched a WordPress instance on AWS using elastic beanstalk. Every now and then AWS restarts my server and when it does all my pages/posts links switch to returning 404. I can fix this by ...
user avatar
0 votes
1 answer
258 views

How to add API security keys into JS of wordpress securely

I am using wp_localize_script() to add variables from my config.ini file to my inline JS code (inside HTML block element of Elementor) [Please see this for reference] But this method is unsafe to add ...
user avatar
  • 3
1 vote
0 answers
275 views

How to change constants in WordPress wp-config.php programmatically?

As the title suggests, I would like to change some constants (in Setting status) in the wp-config.php file. For example define('WP_DEBUG', true); I want to set it as. But I want to be able to do this ...
user avatar
  • 75
1 vote
1 answer
402 views

WP_Debug not displaying anything

In wp-config.php I have included: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); As I understand, this should display certain information on every page, also if there are no errors. However, ...
user avatar
  • 117
0 votes
1 answer
168 views

How to get database connection details without longing to cpanel in WordPress?

I am creating a WordPress plugin and in my plugin i need to do some SQL statements ,in the site i am working on i have access to WP-admin but i cant get to the files to get database name and password ...
user avatar
  • 9
0 votes
0 answers
50 views

reWrite wp-content url to point on my cdn

I want to serve wp-content from my digitalocean Spaces CDN. I want to do this without a plugin. In the wp-admin/options.php the only URL I can change is upload_url_path.
user avatar
0 votes
0 answers
17 views

WP-Admin throws 404 after changing wp-config Salts

I was looking around my site's files to see, where an old version of jQuery is defined. Somewhat found the culprit, but also changed salts. After changing salts, the WP-Admin zone throws 404 now.
user avatar
  • 111
1 vote
0 answers
116 views

Force WordPress to load from site's hostname

I am looking for a WP php rule to always serve any webpage via the desired host without adding a redirect rule which is not an option in this case. see below. We have our main site on one server and a ...
user avatar
  • 61
0 votes
1 answer
36 views

Better error messages upon critical errors - HTTP Error 500

I had an error in a custom class I've made, where this was the error: private function someFunction(): void { // Returns void ... ... ... return true; // <- Returns a value, when ...
user avatar
  • 598
0 votes
1 answer
68 views

How can I redefine WordPress wp-content directory programmatically?

How can I change the default "/wp-content/" folder name in WordPress by typing a plugin or using our theme's "functions.php" file? This is possible with the "wp-config.php&...
user avatar
  • 99
1 vote
0 answers
80 views

Use external database with local multisite

I am trying to connect my local wordpress multisite to my staging database. It works perfect when I am not on a multisite but with the multisite I can't find a way to change the value of the main ...
user avatar
  • 549
0 votes
1 answer
91 views

Clone WordPress for testing on localhost (with Fiddler)

My local setup for WordPress is at http://127.0.0.3/blog. When calling https://my.domain.name/blog/wp-login.php, I get the page served; including Google CAPTCHA. But the login post to a 302 redirect ...
user avatar
  • 111
0 votes
2 answers
408 views

Carriage Return control character (^M) found in wp-config-sample.php

On a fresh WordPress install in Linux distributions, wp-config-sample.php contains Carriage Return control characters that are not found in any other .php file in the distribution. Running egrep -l $'\...
user avatar
0 votes
1 answer
76 views

How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development

First time here, facing a bigtime wordpress situation. My Ubuntu installation crashed beyond repair during upgrading version. Managed only to copy the wordpress files, installed in /opt/lampp/htdocs, ...
user avatar
0 votes
1 answer
158 views

Problem migrating to localhost

Hey guys :) I have to following case. I was given a WP site for "fixing". The website is huge in size. It's around 3GB and the DB is around 350MB. Most of the DB size is coming from postmeta ...
user avatar
1 vote
1 answer
295 views

Can I delete `wp-config-sample.php` after installing and configuring Wordpress?

Can I remove wp-config-sample.php after installing and configuring Wordpress? Could this have any consequences in the future? Is this file restored after updating? At first glance, it just seems ...
user avatar
  • 431
0 votes
1 answer
764 views

Set site title & tagline with wp.config or function.php

Currently I can change Site Title & Tagline in Settings >> General but someone attack and remove it. So now I want to set these via function.php or wp-config.php Any Idea?
user avatar
  • 131
0 votes
0 answers
94 views

Plesk login inaccessible after changing site URL

I was initially facing this issue: (I am locked out of my WordPress site after changing site URL from Http to Https). I need to access wp-config to implement the given solution and was trying to ...
user avatar
0 votes
0 answers
30 views

Site cannot access external connection

my WordPress site cannot access external connection (e.g. cannot browse/update plugins using dashboard - manual zip install only). The site is can be access from the outside world (via domain name) ...
user avatar
5 votes
5 answers
13k views

Upgrading PHP version results in "Use of undefined constant WP_CONTENT_DIR" warning?

On my HostGator shared hosting with a CPanel option to set PHP per domain, if I turn on PHP 7.3 (or other 7.x versions) for my existing blog I get an error page: Warning: Use of undefined constant ...
user avatar
  • 177
0 votes
0 answers
683 views

wp-config.php not affecting my site

I just received a backup of my WP site from the developer that includes the WP files and the database .sql file. I'm trying to install it on my server, but my WP build is ignoring wp-config.php. When ...
user avatar
  • 113
0 votes
2 answers
62 views

Multiple Address In WP-Option Value

I've tried to setup my wordpress using 1 domain name and 1 ip address, after this, all the css is missing, but the site still can be accessible using both domain and ip address. Then I tried to ...
user avatar
0 votes
1 answer
18 views

Changes not being reflected on new server

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 ...
user avatar
0 votes
0 answers
162 views

Unexpected: Wordpress redirects to the WP_HOME/WP_SITEURL value

Hello Wordpress colleagues, I'm working on existing WP instance (5.2.5) having an issue with WP_SITEURL and WP_HOME defined in wp-config.php. Expected Result: I expect WP_SITEURL and WP_HOME to ...
user avatar
  • 101
0 votes
0 answers
299 views

WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update

Problem: All pluging & themes updates fail on folder does not exist or unavialble (WP. 5.3.2) After research I found that in wp-admin/file.php in function: download_url the call to wp_tempnam() ...
user avatar
  • 111
0 votes
2 answers
1k views

My Site keeps crashing due to the wp-confg file being deleted

The wp-config.php file keeps on getting deleted. Before this started to happen, extra characters would automatically appear in my database username and password which would take my website down, I'd ...
user avatar
0 votes
0 answers
268 views

Should I prevent access to .htaccess and wp-config.php files?

Someone at stackoverflow suggested I should deny access to the two files by doing below in .htaccess. <files ~ "^.*\.([Hh][Tt][Aa])"> order allow,deny deny from all satisfy all </files&...
user avatar
0 votes
2 answers
258 views

Are the wordpress settings (abspath, disable core updates) added by SiteGround of any use after I've migrated to a different host?

I had started my wordpress site with the host SiteGround. Later I moved to another host. I now see that in my wp-config.php file the following settings are present near the end of the file: /* That'...
user avatar
  • 135
0 votes
2 answers
50 views

Is my way to change WordPress server is correct?

I'm in the process of changing my web host. I'm wondering about the cleanest way to migrate my WordPress blog. I'm far from being a WordPress expert, I only use it to publish a few posts. Could you ...
user avatar
  • 101
0 votes
1 answer
338 views

Need help re-connecting local WP-config file to local database

When uploading my site to the remote Bluehost server (using FileZilla), I mistakenly changed the local (rather than remote) wp-config.php file and can no longer log into my localhost /wp-admin. I ...
user avatar
0 votes
0 answers
84 views

Getting file errors in a Wordpress Multisite ADMIN

This is for a multisite that has 3 levels of organization: main site - regions (subsites) and locations (sub-subsites). So you would be able to visit and administrate these urls: domain.com --> main ...
user avatar
  • 31
0 votes
0 answers
34 views

the temporary save folder is wrong

when i try to upload image or add plugin to my wordpress website i get this errer the temporary save folder is wrong i try to fix this by creating temp folder in wp-content and fixing wp-config....
user avatar
1 vote
1 answer
292 views

Force SSL using FORCE_SSL_ADMIN

I followed this advice from the official docs to force SSL: define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; Wordpress runs ...
user avatar
  • 293
1 vote
1 answer
115 views

Why edits to wp-config.php must come before "That's all" comment

Every time I read about making changes to wp-config.php, the advice given is to make changes before this line: /* That's all, stop editing! Happy publishing. */ Why? What is special about that ...
user avatar
  • 293
3 votes
1 answer
22k views

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

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 ...
user avatar
0 votes
0 answers
190 views

Domain not redirected correctly with Wordpress Multisite

My Wordpress multisite installation uses two sites: Site 1: www.myexample.com Site 2: blog.myexample.com In addition, I own a second domain myexample2.com, which I would like to redirect to the ...
user avatar
0 votes
1 answer
238 views

Disable globally "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" with Multisite

I would like to disable the "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" function for all blogs in my WordPress Multisite setup. This function is available in Dashboard,...
user avatar
  • 289
2 votes
2 answers
84 views

Best practice differences in DB options and wp-config between live, staging and local WordPress environments?

I've been using staging sites for years. So I'm not asking about the necessary difference to setup a working staging site such as search replacing URLs, dev version control branches, changing table ...
user avatar

1
2 3 4 5
8