Community

WordPress custom table prefix preventing staging site creation

RM
Rana Muhammad Usman Nasir #1

Hello Guys

There was an error while creating a staging site through CyberPanel. There was a problem that when the master site have a different $table_prefix value in wp-config.php it was not working.

To rectify this problem. I’ve first fetched the table_prefix from master site here.

Then after the wp config file for staging site is configured, I’ve used wp config command to set this table prefix here.

On your CyberPanel installation this file is available at /usr/local/CyberCP/websiteFunctions/StagingSetup.py

So if you are a developer, you can use any editor to make improvements to this file and then run systemctl restart lscpd to apply those changes to take affect.

thanks.

MA
MUHAMMED ALJAILANE #2

:slightly_smiling_face:Good, can it be applied via the update because I am not a capable developer to apply the changes

RM
Rana Muhammad Usman Nasir #3

Yes, if you just upgrade to v2.1.2 (or force update). The new code will take place.

SR
Sarah Richardson #4

@usmannasir. Excellent work following our conversation last week. I will update asap. I assume this will also resolve the issue with search and replace on the staging site?

Sign in to reply