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
-1
votes
0answers
30 views

Do I put define( 'WP_DEBUG', true ); after 'wp_;/* then before "Thats all, stop editing

I know I must put define(WP_DEBUG', true); before "Thats all, stop editing, but now I see 'wp_';/* just before that. Do I use that 'wp_';/* in my code and leave out define for example, or do I ...
0
votes
1answer
22 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 (...
0
votes
0answers
13 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 ...
0
votes
0answers
10 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 ...
1
vote
3answers
112 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 ...
0
votes
1answer
50 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 ...
2
votes
1answer
59 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 ...
0
votes
0answers
16 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 ...
1
vote
1answer
29 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 ...
0
votes
1answer
60 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 ...
0
votes
0answers
15 views

After restoration of backup, I am redirected to /wp-admin/install.php

Yesterday I tried restoring an older backup of my website through the panel of my hosting provider, following their instructions. Ever since, when I go to my site, it redirects me to /wp-admin/install....
0
votes
0answers
16 views

whenever I am visiting to subdomain it keeps redirecting to Main domain

I have created a Subdomain and installed wordpress on it, I have also deleted .htaccess file from subdomain directory. but it keeps redirecting to main domain. i have also added these line to Wp-...
1
vote
0answers
106 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 ...
1
vote
1answer
29 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, ...
0
votes
1answer
36 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 ...
0
votes
0answers
34 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.
0
votes
0answers
15 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.
1
vote
0answers
83 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 ...
0
votes
1answer
24 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 ...
0
votes
1answer
27 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&...
0
votes
0answers
12 views

how tochange url for wp-includes on s3/cloudfront url

Im building an high available and fault tolerant Wordpress enviroment on AWS and it working fine, i have my linux ami with /var/www/html mounted on efs and /var/www/html/wp-content mounted on S3 ...
1
vote
0answers
66 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 ...
0
votes
1answer
67 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 ...
0
votes
0answers
177 views

Can't update WordPress with Admin Users

I can't update WordPress. I'm logged in as User Admin and see the message 'WordPress 5.5.1 is available! Please notify the site administrator.' but I am already logged in as administrator. This ...
-1
votes
2answers
277 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 $'\...
0
votes
1answer
42 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, ...
0
votes
1answer
115 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 ...
1
vote
1answer
132 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 ...
0
votes
1answer
420 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?
0
votes
0answers
53 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 ...
0
votes
0answers
19 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) ...
5
votes
5answers
11k 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 ...
0
votes
0answers
427 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 ...
0
votes
2answers
43 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
92 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 ...
0
votes
0answers
185 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() ...
0
votes
2answers
781 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 ...
0
votes
0answers
201 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&...
0
votes
2answers
195 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'...
0
votes
2answers
41 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 ...
0
votes
1answer
255 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 ...
0
votes
0answers
58 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 ...
0
votes
0answers
31 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....
1
vote
1answer
183 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 ...
1
vote
1answer
58 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 ...
2
votes
1answer
15k 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 ...
0
votes
0answers
123 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 ...
0
votes
1answer
116 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,...
2
votes
2answers
68 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 ...

1
2 3 4 5
8